-
Notifications
You must be signed in to change notification settings - Fork 25
第11回の課題(大倉) #57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
第11回の課題(大倉) #57
Conversation
isLast := num == len(nums) | ||
|
||
go func(n int, isLast bool) { | ||
if isLast { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
メモ:最後に完了するgoroutineをどうやって判別するのかわからなかったので、もう一度考える
func main() { | ||
fmt.Println("+++++ Metronome is start +++++") | ||
|
||
bpm := 120 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
標準入力から受け取れるようにする
defer ticker.Stop() | ||
|
||
go func() { | ||
time.Sleep(5 * time.Second) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
標準入力から止めれるようにしてみたい
select { | ||
case <-ticker.C: | ||
if flag == 0 { | ||
fmt.Println("tic") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
beepとかならせるかな・・?
No description provided.