diff options
| author | yangwei <[email protected]> | 2023-08-06 22:34:54 +0800 |
|---|---|---|
| committer | yangwei <[email protected]> | 2023-08-06 23:41:07 +0800 |
| commit | caeb34d472c72acd29b62d3f84198523ac2f1dbd (patch) | |
| tree | 669cbf37d2e342e8dbb7f87f52e0c00553ccec98 /src/support | |
| parent | 740cd8de43c5f8cf76293751995e8074610a8680 (diff) | |
✨ feat(process_latency): 新增clock_gettime_id选项,用于指定clock类型
Diffstat (limited to 'src/support')
| -rw-r--r-- | src/support/cpu_limit/cpu_limit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/support/cpu_limit/cpu_limit.c b/src/support/cpu_limit/cpu_limit.c index 7b6fa9f..cbfb5d0 100644 --- a/src/support/cpu_limit/cpu_limit.c +++ b/src/support/cpu_limit/cpu_limit.c @@ -418,7 +418,7 @@ static inline long long _cl_get_current_time_in_ms(void) //gettimeofday(&t, NULL); //tms = t.tv_sec * 1000 + t.tv_usec/1000; struct timespec t; - clock_gettime(CLOCK_MONOTONIC_COARSE, &t); + clock_gettime(CLOCK_MONOTONIC, &t); tms = (t.tv_sec)*1000 + (t.tv_nsec)/(1000*1000); return tms; |
