Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Examples  

test_stopwatch.c

This example shows how to use the function start_chrono()

#include <stdio.h>
#include <unistd.h>
#include "timing.h"



int main()
{

  if (start_chrono() == -1)
  { fprintf (stderr, "\nstart_chrono() failed\n"); return 1; }

  sleep(1);

  if (stop_chrono() == -1)
  { fprintf (stderr, "\nstop_chrono() failed\n"); return 1; }

  fprintf (stdout, "\nElapsed time is: %lu ms\n", get_ms());

  return 0;
}

Generated on Thu Apr 3 16:23:42 2003 for Common_C_libraries by doxygen1.3-rc1