What is the difference between C.sleep() and time.Sleep() ?
What is the difference between C.sleep() and time.Sleep() ?
The difference between C.sleep()
and time.Sleep()
primarily lies in the programming languages and environments they are used in, as well as their parameter specifications.
C.sleep()
:
unistd.h
header file on Unix-like systems.sleep()
takes an argument in seconds. For example, sleep(10);
will make the program pause for 10 seconds[1].time.Sleep()
:
time
package in Go, hence it is called using time.Sleep()
.time.Sleep()
takes a duration argument in nanoseconds, unless specified otherwise using time constants. For example, `time.Sle...middle
Gợi ý câu hỏi phỏng vấn
Chưa có bình luận nào