1 #include "libplatform/impl.h"
2 #include <sys/time.h>
3 
4 namespace mp4v2 { namespace platform { namespace time {
5 
6 ///////////////////////////////////////////////////////////////////////////////
7 
8 milliseconds_t
getLocalTimeMilliseconds()9 getLocalTimeMilliseconds()
10 {
11     timeval buf;
12     if( gettimeofday( &buf, 0 ))
13         memset( &buf, 0, sizeof( buf ));
14     return milliseconds_t( buf.tv_sec ) * 1000 + buf.tv_usec / 1000;
15 }
16 
17 ///////////////////////////////////////////////////////////////////////////////
18 
19 }}} // namespace mp4v2::platform::time
20