Rule US 1967 1973 - Apr lastSun 2:00 1:00 D
Zone Australia/Adelaide 9:30 Aus CST 1971 Oct 31 2:00
time(NULL)
- returns the number of seconds elapsed
since 1/1/1970 at midnight, in UTC.
date 0822004705
[choo@simey ~]$ telnet 127.0.0.1 daytime Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. 22 AUG 2005 00:56:39 IDT Connection closed by foreign host. [choo@simey ~]$
choo@simey ~]$ telnet 127.0.0.1 time Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. Ƴw7Connection closed by foreign host. [choo@simey ~]$
[choo@simey ~]$ rdate 127.0.0.1 [127.0.0.1] Mon Aug 22 00:58:06 2005 [choo@simey ~]$
root@simey ~]# rdate -s 127.0.0.1 [root@simey ~]# date Mon Aug 22 01:00:30 IDT 2005 [root@simey ~]#
int rc; struct timeval timeout; timeout.tv_sec = 0; timeout.tv_usec = 10; rc = select(0, NULL, NULL, NULL, &timeout);
date; my_program; date
time my_program
gettimeofday()
before
and after some interesting code chunk, and calculating the difference.
gprof -b