/ src / libnml / os_intf / _timer.h
_timer.h
 1  /********************************************************************
 2  * Description: _timer.h
 3  *   timer.cc -- interval timer code.  A TIMER object lets you wait
 4  *   on the expiration of a cyclic period, to the resolution of the
 5  *   system clock.
 6  *
 7  *   Derived from a work by Fred Proctor & Will Shackleford
 8  *
 9  * Author:
10  * License: LGPL Version 2
11  * System: Linux
12  *    
13  * Copyright (c) 2004 All rights reserved.
14  *
15  * Last change: 
16  ********************************************************************/
17  #ifndef _TIMER_H
18  #define _TIMER_H
19  
20  /* Useful time routines */
21  
22  #ifdef __cplusplus
23  extern "C" {
24  #endif
25  /* clock tick resolution, in seconds */
26      extern double clk_tck(void);
27  /* number of seconds from standard epoch, to clock tick resolution */
28      extern double etime(void);
29  /* sleeps # of seconds, to clock tick resolution */
30      extern void esleep(double secs);
31      void start_timer_server(int priority, int sem_id);
32      void kill_timer_server(void);
33      extern void print_etime(void);
34  
35  #ifdef __cplusplus
36  }
37  #endif
38  extern int etime_disabled;
39  extern double etime_disable_time;
40  extern int esleep_use_yield;
41  
42  #endif