Skip to content

Commit

Permalink
9.26 change some format of rtc
Browse files Browse the repository at this point in the history
  • Loading branch information
lhw2002426 committed Sep 26, 2023
1 parent 24b51a6 commit bfdfa2d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion api/arceos_posix_api/src/imp/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ pub unsafe fn sys_clock_settime(_clk: ctypes::clockid_t, ts: *mut ctypes::timesp
return Err(LinuxError::EFAULT);
}
let new_tv = Duration::from(*ts);
axhal::time::set_current_time(new_tv);
debug!(
"sys_clock_setttime: {}.{:09}s",
new_tv.as_secs(),
new_tv.as_nanos()
);
axhal::time::set_current_time(new_tv);
Ok(0)
})
}
Expand Down
3 changes: 1 addition & 2 deletions apps/c/helloworld/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ int main()
{
printf("Hello, %c app!\n", 'C');
return 0;

}
}
1 change: 0 additions & 1 deletion apps/c/systime/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ int main()
printf("now time: %ld : %ld\n", tv.tv_sec,tv.tv_usec);

usleep(3000000);
//sleep(3);

if (gettimeofday(&tv, NULL) != 0 ) {
perror("gettimeofday");
Expand Down

0 comments on commit bfdfa2d

Please sign in to comment.