local: add support for clock_gettime()

Use clock_gettime() to read the system clock in nanosecond resolution.
This commit is contained in:
Miroslav Lichvar
2016-08-18 15:07:01 +02:00
parent cfe706f032
commit 8d89610ff6
4 changed files with 26 additions and 19 deletions

View File

@@ -452,8 +452,8 @@ SYS_Linux_EnableSystemCallFilter(int level)
{
const int syscalls[] = {
/* Clock */
SCMP_SYS(adjtimex), SCMP_SYS(gettimeofday), SCMP_SYS(settimeofday),
SCMP_SYS(time),
SCMP_SYS(adjtimex), SCMP_SYS(clock_gettime), SCMP_SYS(gettimeofday),
SCMP_SYS(settimeofday), SCMP_SYS(time),
/* Process */
SCMP_SYS(clone), SCMP_SYS(exit), SCMP_SYS(exit_group), SCMP_SYS(getrlimit),
SCMP_SYS(rt_sigaction), SCMP_SYS(rt_sigreturn), SCMP_SYS(rt_sigprocmask),