Skip to content
Snippets Groups Projects
Unverified Commit d14d0b59 authored by Moses Miller's avatar Moses Miller Committed by Moses Miller
Browse files

Fix various formatting issues

parent 766e00c6
No related branches found
No related tags found
1 merge request!120Implement clock() and add CLOCK_* constants
......@@ -48,4 +48,4 @@ pub(crate) const CLOCK_MONOTONIC: clockid_t = 1;
pub(crate) const CLOCK_PROCESS_CPUTIME_ID: clockid_t = 2;
pub(crate) const CLOCK_THREAD_CPUTIME_ID: clockid_t = 3;
pub(crate) const CLOCKS_PER_SEC: time_t = 1_000_000;
\ No newline at end of file
pub(crate) const CLOCKS_PER_SEC: time_t = 1_000_000;
......@@ -105,7 +105,8 @@ pub extern "C" fn clock() -> clock_t {
}
if ts.tv_sec > time_t::max_value() / CLOCKS_PER_SEC
|| ts.tv_nsec / (1_000_000_000 / CLOCKS_PER_SEC) > time_t::max_value() - CLOCKS_PER_SEC * ts.tv_sec
|| ts.tv_nsec / (1_000_000_000 / CLOCKS_PER_SEC)
> time_t::max_value() - CLOCKS_PER_SEC * ts.tv_sec
{
return -1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment