当前位置:网站首页>Go write a program that runs within a certain period of time
Go write a program that runs within a certain period of time
2022-07-07 08:32:00 【Jimmy_ jimi】
The goal is : Print diamond
Execute a program , Keep it running for a certain period of time
Result output :
func main() {
go log.Log2("1","1","1")
start :=time.Now()
time.Sleep(10*time.Millisecond)
fmt.Println(time.Since(start).Milliseconds())
re:
for {
fmt.Println(int(time.Since(start).Milliseconds()))
if int(time.Since(start).Milliseconds())>1000{
break re
}
}
for int(time.Since(start).Milliseconds())>1000{
}
fmt.Println("2")
}
边栏推荐
- 打通法律服务群众“最后一公里”,方正璞华劳动人事法律自助咨询服务平台频获“点赞”
- How to realize the high temperature alarm of the machine room in the moving ring monitoring system
- The field value in Splunk subquery fuzzy matching CSV is*
- Rainbow version 5.6 was released, adding a variety of installation methods and optimizing the topology operation experience
- Bisenet features
- Obsidan之数学公式的输入
- OpenVSCode云端IDE加入Rainbond一体化开发体系
- Are you holding back on the publicity of the salary system for it posts such as testing, development, operation and maintenance?
- Snyk 依赖性安全漏洞扫描工具
- Splunk子查询模糊匹配csv中字段值为*
猜你喜欢

Learn how to compile basic components of rainbow from the source code

2-3查找樹

Opencv learning notes II - basic image operations

打通法律服务群众“最后一公里”,方正璞华劳动人事法律自助咨询服务平台频获“点赞”

一种适用于应用频繁测试下快速查看Pod的日志的方法(grep awk xargs kuberctl)

MySQL introduction - crud Foundation (establishment of the prototype of the idea of adding, deleting, changing and searching)

SSM integration

饥荒云服管理脚本

Splunk query CSV lookup table data dynamic query

A method for quickly viewing pod logs under frequent tests (grep awk xargs kuberctl)
随机推荐
Give full play to the wide practicality of maker education space
Implement your own dataset using bisenet
Golang compilation constraint / conditional compilation (/ / +build < tags>)
How to realize the high temperature alarm of the machine room in the moving ring monitoring system
一文了解如何源码编译Rainbond基础组件
MES系統,是企業生產的必要選擇
PLSQL的安装和配置
单场带货涨粉10万,农村主播竟将男装卖爆单?
Interface as a parameter (interface callback)
解析创新教育体系中的创客教育
Open3D ISS关键点
Pvtv2--pyramid vision transformer V2 learning notes
Offer harvester: add and sum two long string numbers (classic interview algorithm question)
[hard core science popularization] working principle of dynamic loop monitoring system
Fluentd is easy to use. Combined with the rainbow plug-in market, log collection is faster
JS copy picture to clipboard read clipboard
Ebpf cilium practice (2) - underlying network observability
Caractéristiques de bisenet
Infix keyword infix expression and the use of generic extension function in kotlin
SSM 整合