mirror of
https://github.com/bootdotdev/fcc-learn-golang-assets.git
synced 2025-12-14 09:11:16 +00:00
36 lines
581 B
Go
36 lines
581 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"time"
|
|
)
|
|
|
|
func saveBackups(snapshotTicker, saveAfter <-chan time.Time) {
|
|
// ?
|
|
}
|
|
|
|
// TEST SUITE - Don't touch below this line
|
|
|
|
func takeSnapshot() {
|
|
fmt.Println("Taking a backup snapshot...")
|
|
}
|
|
|
|
func saveSnapshot() {
|
|
fmt.Println("All backups saved!")
|
|
}
|
|
|
|
func waitForData() {
|
|
fmt.Println("Nothing to do, waiting...")
|
|
}
|
|
|
|
func test() {
|
|
snapshotTicker := time.Tick(800 * time.Millisecond)
|
|
saveAfter := time.After(2800 * time.Millisecond)
|
|
saveBackups(snapshotTicker, saveAfter)
|
|
fmt.Println("===========================")
|
|
}
|
|
|
|
func main() {
|
|
test()
|
|
}
|