File: timer.h

package info (click to toggle)
xbmc 2%3A13.2%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 128,344 kB
  • ctags: 124,885
  • sloc: cpp: 678,122; ansic: 337,697; xml: 67,848; makefile: 10,193; sh: 8,957; pascal: 8,049; objc: 4,283; python: 3,179; asm: 2,510; java: 2,051; perl: 1,408; yacc: 1,315; tcl: 1,048; cs: 757; lisp: 506; awk: 222; lex: 148; ruby: 126; sed: 109
file content (39 lines) | stat: -rwxr-xr-x 925 bytes parent folder | download | duplicates (46)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <time.h>
#include <winsock.h>
#include "pthread.h"

#ifndef _ITIMER_
#define _ITIMER_

#define ITIMER_REAL		0
#define ITIMER_VIRTUAL	1

//	time reference
//	----------------------------------
//
//	1,000			milliseconds / sec
//	1,000,000		microseconds / sec
//	1,000,000,000	nanoseconds  / sec
//
//  timeval.time_sec  = seconds
//  timeval.time_usec = microseconds

struct itimerval
{
	struct timeval it_interval;    /* timer interval */
	struct timeval it_value;       /* current value */
};

struct timezone {
    int     tz_minuteswest; /* minutes west of Greenwich */
    int     tz_dsttime;     /* type of dst correction */
};

int gettimeofday( struct timeval *tp, struct timezone *tzp );
int setitimer( int which, struct itimerval * value, struct itimerval *ovalue );
int pause( void );

unsigned int sleep( unsigned int seconds );
int nanosleep( const struct timespec *rqtp, struct timespec *rmtp );

#endif