21 lines
320 B
C
21 lines
320 B
C
#ifndef TIMER_H
|
|
#define TIMER_H
|
|
#include <time.h>
|
|
|
|
#ifdef __MACH__
|
|
#include <mach/clock.h>
|
|
#include <mach/mach.h>
|
|
#endif
|
|
|
|
struct PTime {
|
|
long s; // seconds
|
|
long m; // milliseconds
|
|
long n; // nanoseconds
|
|
};
|
|
|
|
int getTime(struct PTime *time);
|
|
|
|
void doSleep(long seconds, long milliseconds, long nanoseconds);
|
|
|
|
#endif
|