You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
518 B
20 lines
518 B
4 years ago
|
#include "libplatform/impl.h"
|
||
|
#include <sys/time.h>
|
||
|
|
||
|
namespace mp4v2 { namespace platform { namespace time {
|
||
|
|
||
|
///////////////////////////////////////////////////////////////////////////////
|
||
|
|
||
|
milliseconds_t
|
||
|
getLocalTimeMilliseconds()
|
||
|
{
|
||
|
timeval buf;
|
||
|
if( gettimeofday( &buf, 0 ))
|
||
|
memset( &buf, 0, sizeof( buf ));
|
||
|
return milliseconds_t( buf.tv_sec ) * 1000 + buf.tv_usec / 1000;
|
||
|
}
|
||
|
|
||
|
///////////////////////////////////////////////////////////////////////////////
|
||
|
|
||
|
}}} // namespace mp4v2::platform::time
|