aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
Diffstat (limited to 'erts/emulator')
-rw-r--r--erts/emulator/beam/erl_time_sup.c2
-rw-r--r--erts/emulator/beam/time.c2
-rw-r--r--erts/emulator/sys/unix/sys_time.c11
-rw-r--r--erts/emulator/sys/win32/sys_time.c2
4 files changed, 4 insertions, 13 deletions
diff --git a/erts/emulator/beam/erl_time_sup.c b/erts/emulator/beam/erl_time_sup.c
index 8203436c85..bbdedcc128 100644
--- a/erts/emulator/beam/erl_time_sup.c
+++ b/erts/emulator/beam/erl_time_sup.c
@@ -1693,7 +1693,7 @@ static void
send_time_offset_changed_notifications(void *new_offsetp)
{
ErtsMonotonicTime new_offset;
- ErtsTimeOffsetMonitorInfo *to_mon_info;
+ ErtsTimeOffsetMonitorInfo *to_mon_info = NULL; /* Shut up faulty warning */
Uint no_monitors;
char *tmp = NULL;
diff --git a/erts/emulator/beam/time.c b/erts/emulator/beam/time.c
index 3dfd3f79d4..2bdda6c8af 100644
--- a/erts/emulator/beam/time.c
+++ b/erts/emulator/beam/time.c
@@ -576,7 +576,7 @@ erts_cancel_timer(ErlTimer *p)
{
ErtsTimerWheel *tiw;
ErlCancelProc cancel;
- void *arg;
+ void *arg = NULL; /* Shut up faulty warning... */
tiw = get_timer_wheel(p);
if (!tiw)
diff --git a/erts/emulator/sys/unix/sys_time.c b/erts/emulator/sys/unix/sys_time.c
index ea021a27cf..d535457977 100644
--- a/erts/emulator/sys/unix/sys_time.c
+++ b/erts/emulator/sys/unix/sys_time.c
@@ -410,11 +410,7 @@ erts_os_system_time(void)
stime = (ErtsSystemTime) posix_clock_gettime(WALL_CLOCK_ID,
WALL_CLOCK_ID_STR);
-#if defined(OS_MONOTONIC_TIME_USING_CLOCK_GETTIME)
- return stime;
-#else
return adj_stime_time_unit(stime, (Uint32) 1000*1000*1000);
-#endif
}
#endif /* defined(OS_SYSTEM_TIME_USING_CLOCK_GETTIME) */
@@ -516,8 +512,7 @@ ErtsMonotonicTime erts_os_monotonic_time(void)
#if defined(OS_SYSTEM_TIME_USING_CLOCK_GETTIME)
-static void erts_os_times(ErtsMonotonicTime *mtimep,
- ErtsSystemTime *stimep)
+void erts_os_times(ErtsMonotonicTime *mtimep, ErtsSystemTime *stimep)
{
posix_clock_gettime_times(mtimep, stimep);
}
@@ -627,11 +622,7 @@ erts_os_system_time(void)
ErtsSystemTime stime;
stime = (ErtsSystemTime) mach_clock_gettime(WALL_CLOCK_ID,
WALL_CLOCK_ID_STR);
-#if defined(OS_MONOTONIC_TIME_USING_MACH_CLOCK_GET_TIME)
- return stime;
-#else
return adj_stime_time_unit(stime, (Uint32) 1000*1000*1000);
-#endif
}
#endif /* defined(OS_SYSTEM_TIME_USING_MACH_CLOCK_GET_TIME) */
diff --git a/erts/emulator/sys/win32/sys_time.c b/erts/emulator/sys/win32/sys_time.c
index 7fe61084ce..b292d9279e 100644
--- a/erts/emulator/sys/win32/sys_time.c
+++ b/erts/emulator/sys/win32/sys_time.c
@@ -302,7 +302,7 @@ sys_init_time(ErtsSysInitTimeResult *init_resp)
internal_state.w.f.last_tick_count = 0;
init_resp->os_monotonic_time_info.func = "GetTickCount";
- init_resp->os_monotonic_time_info.locked_use = 1;
+ init_resp->os_monotonic_time_info.locked_use = 0;
/* 10-16 ms resolution according to MicroSoft documentation */
init_resp->os_monotonic_time_info.resolution = 100; /* 10 ms */
time_unit = (ErtsMonotonicTime) 1000;