comparison base/RealTimeSV.cpp @ 1541:71207822a7e0 zoom

Provide fromMicroseconds (and test it)
author Chris Cannam
date Thu, 27 Sep 2018 15:53:34 +0100
parents 48e9f538e6e9
children 6415ac3becb6
comparison
equal deleted inserted replaced
1540:a53bf95f0bea 1541:71207822a7e0
62 62
63 RealTime 63 RealTime
64 RealTime::fromMilliseconds(int msec) 64 RealTime::fromMilliseconds(int msec)
65 { 65 {
66 return RealTime(msec / 1000, (msec % 1000) * 1000000); 66 return RealTime(msec / 1000, (msec % 1000) * 1000000);
67 }
68
69 RealTime
70 RealTime::fromMicroseconds(int usec)
71 {
72 return RealTime(usec / 1000000, (usec % 1000000) * 1000);
67 } 73 }
68 74
69 RealTime 75 RealTime
70 RealTime::fromTimeval(const struct timeval &tv) 76 RealTime::fromTimeval(const struct timeval &tv)
71 { 77 {