diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2022-04-04 18:09:53 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2022-04-04 18:09:53 +0200 |
commit | 4f77685d24fdc3b49a6459b77dc2a23a68aaf30d (patch) | |
tree | cc0010e65d51c1b104cce6237a4c37a6f8e2bc6f /src/c_go2work.go | |
parent | Update (diff) | |
download | go2work-4f77685d24fdc3b49a6459b77dc2a23a68aaf30d.tar.gz go2work-4f77685d24fdc3b49a6459b77dc2a23a68aaf30d.tar.bz2 go2work-4f77685d24fdc3b49a6459b77dc2a23a68aaf30d.tar.xz go2work-4f77685d24fdc3b49a6459b77dc2a23a68aaf30d.tar.zst go2work-4f77685d24fdc3b49a6459b77dc2a23a68aaf30d.zip |
v1.0.0 incoming
Diffstat (limited to '')
-rw-r--r-- | src/c_go2work.go | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/c_go2work.go b/src/c_go2work.go index e11dab4..5a42160 100644 --- a/src/c_go2work.go +++ b/src/c_go2work.go @@ -52,7 +52,6 @@ import ( "os" "strconv" "strings" - "time" ) func main() { @@ -105,46 +104,3 @@ func main() { print_time_left(curr_t, dest_t) main_loop(dest_t, options) } - -func main_loop(dest_t [3]byte, options Options) { - var curr_t [3]byte - ticker := time.NewTicker(INTERVAL * time.Millisecond) - quit := make(chan struct{}) - for { - select { - case <- ticker.C: - curr_t = get_time() - print_time_left(curr_t, dest_t) - if curr_t[HOURS] == dest_t[HOURS] && - curr_t[MINS] == dest_t[MINS] && - curr_t[SECS] == dest_t[SECS] { - file_id := choose_file(options) - var args []string - if file_id >= 0 { - args = append( - options.Player_options, - options.Files[file_id], - ) - } else { - args = append( - options.Player_options, - DEF_FILES()[0], - ) - } - has_rang := false - for { - exec_player( - options.Fortune, - has_rang, - options.Media_player, - args..., - ) - has_rang = true - } - } - case <- quit: - ticker.Stop() - return - } - } -} |