diff options
author | Greg V <greg@unrelenting.technology> | 2018-11-23 20:40:50 +0300 |
---|---|---|
committer | 0EVSG <dev@submerge.ch> | 2021-12-27 20:45:57 +0100 |
commit | 43c40953d3f661c77c8f072ce35760f317a4bbe5 (patch) | |
tree | b0f854bd5ce50e37531a1280fc82268ad6a0d514 | |
parent | c3d59f2093a45a2b957186804129067e4c4abed9 (diff) | |
download | jack2-43c40953d3f661c77c8f072ce35760f317a4bbe5.tar.gz |
Put the clock_gettime based time impl into posix/
-rw-r--r-- | common/wscript | 4 | ||||
-rw-r--r-- | posix/JackPosixTime.c (renamed from freebsd/JackFreeBSDTime.c) | 18 |
2 files changed, 5 insertions, 17 deletions
diff --git a/common/wscript b/common/wscript index 27bb60ff..e22f12f4 100644 --- a/common/wscript +++ b/common/wscript @@ -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']: diff --git a/freebsd/JackFreeBSDTime.c b/posix/JackPosixTime.c index 66790167..cb712140 100644 --- a/freebsd/JackFreeBSDTime.c +++ b/posix/JackPosixTime.c @@ -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() |