Revision e19ad051 src/timestamp.cpp
src/timestamp.cpp | ||
---|---|---|
21 | 21 |
} |
22 | 22 |
|
23 | 23 |
Timestamp Timestamp::now(void){ |
24 |
Timestamp res; |
|
25 | 24 |
struct timespec tp; |
26 | 25 |
clock_gettime(CLOCK_REALTIME, &tp); |
27 |
res.set(tp.tv_sec, tp.tv_nsec); |
|
28 |
return res; |
|
26 |
return Timestamp(tp.tv_sec, tp.tv_nsec); |
|
29 | 27 |
} |
30 | 28 |
|
31 | 29 |
void Timestamp::set(int32_t _sec, int32_t _nsec){ |
Also available in: Unified diff