Jeff Thompson | 9ae4d78 | 2013-10-17 10:25:54 -0700 | [diff] [blame] | 1 | /** |
| 2 | * Copyright (C) 2013 Regents of the University of California. |
| 3 | * @author: Jeff Thompson <jefft0@remap.ucla.edu> |
| 4 | * See COPYING for copyright and distribution information. |
| 5 | */ |
| 6 | |
| 7 | #include <sys/time.h> |
| 8 | #include "time.h" |
| 9 | |
Jeff Thompson | 9a8e82f | 2013-10-17 14:13:43 -0700 | [diff] [blame^] | 10 | ndn_MillisecondsSince1970 |
Jeff Thompson | 9ae4d78 | 2013-10-17 10:25:54 -0700 | [diff] [blame] | 11 | ndn_getNowMilliseconds() |
| 12 | { |
| 13 | struct timeval t; |
| 14 | gettimeofday(&t, 0); |
| 15 | return t.tv_sec * 1000.0 + t.tv_usec / 1000.0; |
| 16 | } |