| version 1.260, Mon Nov 21 19:05:01 2011 UTC | version 1.261, Fri Dec 2 21:59:09 2011 UTC | ||
|---|---|---|---|
|
|
||
| ntime ( -- dtime ) gforth | ntime ( -- dtime ) gforth | ||
| ""Report the current time in nanoseconds since some epoch."" | ""Report the current time in nanoseconds since some epoch."" | ||
| #ifdef HAVE_CLOCK_GETTIME | |||
| struct timespec time1; | struct timespec time1; | ||
| clock_gettime(CLOCK_REALTIME,&time1); | clock_gettime(CLOCK_REALTIME,&time1); | ||
| dtime = timespec2ns(&time1); | dtime = timespec2ns(&time1); | ||
| #else | |||
| struct timeval time1; | |||
| gettimeofday(&time1,NULL); | |||
| dtime = timeval2us(&time1) * 1000LL; | |||
| #endif | |||
| \+ | \+ | ||
|
||||||||
|
CVS Admin Powered by ViewCVS 1.0-dev |
ViewCVS and CVS Help |