mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +00:00
Maximum time range is 1.6 days.
This commit is contained in:
parent
ea4b64909f
commit
8627a31912
@ -195,15 +195,9 @@ const char* TimeToString( int64_t _ns )
|
|||||||
const auto h = int64_t( ns / ( 1000ll * 1000 * 1000 * 60 * 60 ) - d * 24 );
|
const auto h = int64_t( ns / ( 1000ll * 1000 * 1000 * 60 * 60 ) - d * 24 );
|
||||||
const auto m = int64_t( ns / ( 1000ll * 1000 * 1000 * 60 ) - d * ( 60 * 24 ) - h * 60 );
|
const auto m = int64_t( ns / ( 1000ll * 1000 * 1000 * 60 ) - d * ( 60 * 24 ) - h * 60 );
|
||||||
const auto s = int64_t( ns / ( 1000ll * 1000 * 1000 ) - d * ( 60 * 60 * 24 ) - h * ( 60 * 60 ) - m * 60 );
|
const auto s = int64_t( ns / ( 1000ll * 1000 * 1000 ) - d * ( 60 * 60 * 24 ) - h * ( 60 * 60 ) - m * 60 );
|
||||||
if( d < 1000 )
|
assert( d < 100 );
|
||||||
{
|
PrintTinyInt( buf, d );
|
||||||
PrintSmallInt( buf, d );
|
|
||||||
*buf++ = 'd';
|
*buf++ = 'd';
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
buf += sprintf( buf, "%" PRIi64 "d", d );
|
|
||||||
}
|
|
||||||
PrintTinyInt0( buf, h );
|
PrintTinyInt0( buf, h );
|
||||||
*buf++ = ':';
|
*buf++ = ':';
|
||||||
PrintTinyInt0( buf, m );
|
PrintTinyInt0( buf, m );
|
||||||
|
Loading…
Reference in New Issue
Block a user