Blob
1 .TH TIME 32 .SH NAME3 time, nsec \- time in seconds and nanoseconds since epoch4 .SH SYNOPSIS5 .B #include <u.h>6 .br7 .B #include <libc.h>8 .PP9 .nf10 .B11 long time(long *tp)12 .PP13 .B14 vlong nsec(void)15 .SH DESCRIPTION16 Both17 .I time18 and19 .I nsec20 return the time since the epoch 00:00:00 GMT, Jan. 1, 1970.21 The return value of the former is in seconds and the latter in nanoseconds.22 For23 .IR time ,24 if25 .I tp26 is not zero then27 .BI * tp28 is also set to the answer.29 .PP30 These functions work by reading31 .BR /dev/bintime ,32 opening that file when33 .I they34 are first called.35 .SH SOURCE36 .B /usr/local/plan9/src/libc/9sys/time.c37 .br38 .B /usr/local/plan9/src/libc/9sys/nsec.c39 .SH SEE ALSO40 .IR cons (3)41 .SH DIAGNOSTICS42 Sets43 .IR errstr .44 .SH BUGS45 These routines maintain a static file descriptor.