Reputation: 2077
My project is a long time daemon service and need to busy check some conditions and take actions as soon as possible.
I want to use std::steady_clock
to account the responsing time of my service and the busy/free duty proportion.
Everytime the service runs about in 20~100 microseconds, while the designing requirement is less than 160us. So I'm afraid that it would waste too much time to call steady_clock::now()
frequently.
My question:
steady_clock::now()
make a syscall potentially? Would it
result my program to be blocked irregularly for a long time(exceed
1ms)?Upvotes: 3
Views: 269