Skip to content

第11回の課題(大倉) - #57

Open
ookura-mf wants to merge 3 commits into
mf-sakura:masterfrom
ookura-mf:dai11kai_no_kadai
Open

ookura-mf wants to merge 3 commits into
mf-sakura:masterfrom
ookura-mf:dai11kai_no_kadai

Conversation

@ookura-mf

Copy link
Copy Markdown

No description provided.

isLast := num == len(nums)

go func(n int, isLast bool) {
if isLast {

Copy link
Copy Markdown
Author

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

Copy link
Copy Markdown
Author

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)

Copy link
Copy Markdown
Author

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")

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

beepとかならせるかな・・?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant