Home > Backend Development > Golang > Why does golang sleep have no return value?

Why does golang sleep have no return value?

(*-*)浩
Release: 2019-12-17 11:11:55
Original
2823 people have browsed it

Why does golang sleep have no return value?

#Golang’s sleep can use sleep in the time package.

# The prototype of the function is: (Recommended learning: Go )

func Sleep(d Duration)
Copy after login

. The unit of #Duration is nanosecond.

For ease of use, time constants are defined in time:

type Duration int64
Copy after login

The above is the detailed content of Why does golang sleep have no return value?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
How to choose golang web mvc framework
From 1970-01-01 08:00:00
0
0
0
Is it necessary to use nginx when using golang?
From 1970-01-01 08:00:00
0
0
0
golang - vim plug-in to write go
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template