This repository was archived by the owner on Oct 12, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -3344,10 +3344,8 @@ struct TickDuration
3344
3344
import core.internal.abort : abort;
3345
3345
version (Windows )
3346
3346
{
3347
- ulong ticks;
3348
- if (QueryPerformanceCounter(cast (long * )&ticks) == 0 )
3349
- abort(" Failed in QueryPerformanceCounter()." );
3350
-
3347
+ ulong ticks = void ;
3348
+ QueryPerformanceCounter(cast (long * )&ticks);
3351
3349
return TickDuration (ticks);
3352
3350
}
3353
3351
else version (Darwin)
@@ -3356,10 +3354,8 @@ struct TickDuration
3356
3354
return TickDuration (cast (long )mach_absolute_time());
3357
3355
else
3358
3356
{
3359
- timeval tv;
3360
- if (gettimeofday(&tv, null ) != 0 )
3361
- abort(" Failed in gettimeofday()." );
3362
-
3357
+ timeval tv = void ;
3358
+ gettimeofday(&tv, null );
3363
3359
return TickDuration (tv.tv_sec * TickDuration.ticksPerSec +
3364
3360
tv.tv_usec * TickDuration.ticksPerSec / 1000 / 1000 );
3365
3361
}
@@ -3377,10 +3373,8 @@ struct TickDuration
3377
3373
}
3378
3374
else
3379
3375
{
3380
- timeval tv;
3381
- if (gettimeofday(&tv, null ) != 0 )
3382
- abort(" Failed in gettimeofday()." );
3383
-
3376
+ timeval tv = void ;
3377
+ gettimeofday(&tv, null );
3384
3378
return TickDuration (tv.tv_sec * TickDuration.ticksPerSec +
3385
3379
tv.tv_usec * TickDuration.ticksPerSec / 1000 / 1000 );
3386
3380
}
You can’t perform that action at this time.
0 commit comments