Put the clock_gettime based time impl into posix/

This commit is contained in:
Greg V 2018-11-23 20:40:50 +03:00 committed by falkTX
parent 5f9e108e16
commit 92e9596aa5
2 changed files with 5 additions and 17 deletions

View File

@ -105,8 +105,8 @@ def build(bld):
'../posix/JackPosixMutex.cpp',
'../posix/JackPosixSemaphore.cpp',
'../posix/JackSocket.cpp',
'../freebsd/JackFreeBSDTime.c',
]
'../posix/JackPosixTime.c',
]
includes = ['../freebsd', '../posix'] + includes
if bld.env['IS_SUN']:

View File

@ -57,25 +57,13 @@ SERVER_EXPORT void EndTime()
void SetClockSource(jack_timer_type_t source)
{
jack_log("Clock source : %s", ClockSourceName(source));
switch (source)
{
case JACK_TIMER_SYSTEM_CLOCK:
default:
_jack_get_microseconds = jack_get_microseconds_from_system;
break;
}
jack_log("Clock source : %s", ClockSourceName(source));
_jack_get_microseconds = jack_get_microseconds_from_system;
}
const char* ClockSourceName(jack_timer_type_t source)
{
switch (source) {
case JACK_TIMER_SYSTEM_CLOCK:
return "system clock via clock_gettime";
}
return "unknown";
return "system clock via clock_gettime";
}
SERVER_EXPORT jack_time_t GetMicroSeconds()