Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Solaris time unittest fix: unimplemented clock types checking added. #78

Open
wants to merge 1 commit into
base: ldc
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/core/time.d
Original file line number Diff line number Diff line change
Expand Up @@ -2686,7 +2686,13 @@ unittest

static bool clockSupported(ClockType c)
{
version (Linux_Pre_2639) // skip CLOCK_BOOTTIME on older linux kernels
version (Solaris)
{
// CLOCK_REALTIME and CLOCK_HIGHRES (CLOCK_MONOTONIC) are the only two
// clock currently implemented on solaris and illumos.
return c != ClockType.second && c != ClockType.processCPUTime && c != ClockType.threadCPUTime;
}
else version (Linux_Pre_2639) // skip CLOCK_BOOTTIME on older linux kernels
return c != ClockType.second && c != ClockType.bootTime;
else
return c != ClockType.second; // second doesn't work with MonoTimeImpl
Expand Down