Skip to content

Commit 2d51327

Browse files
committed
minor
1 parent f7c6867 commit 2d51327

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

ark/cpu_timer.cpp

-16
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,4 @@ double cpu_timer(void) {
1616
return (tspec.tv_nsec / 1.0e9) + tspec.tv_sec;
1717
}
1818

19-
// Sleep in second.
20-
int cpu_timer_sleep(double sec) {
21-
struct timespec tspec;
22-
tspec.tv_sec = (time_t)sec;
23-
tspec.tv_nsec = (long)((sec - tspec.tv_sec) * 1.0e9);
24-
return nanosleep(&tspec, 0);
25-
}
26-
27-
// Sleep in nanosecond.
28-
int cpu_ntimer_sleep(long nsec) {
29-
struct timespec tspec;
30-
tspec.tv_sec = 0;
31-
tspec.tv_nsec = nsec;
32-
return nanosleep(&tspec, 0);
33-
}
34-
3519
} // namespace ark

ark/cpu_timer.h

-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ namespace ark {
88

99
// Measure current time in second.
1010
double cpu_timer(void);
11-
// Sleep in second.
12-
int cpu_timer_sleep(double sec);
13-
// Sleep in nanosecond.
14-
int cpu_ntimer_sleep(long nsec);
1511

1612
} // namespace ark
1713

0 commit comments

Comments
 (0)