You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

22 lines
550 B

package main
import (
"fmt"
"strconv"
"time"
)
func waitMinutes(minutes int) {
//wait to avoid the twitter api limitation
timeToSleep := time.Duration(minutes) * time.Minute
fmt.Println("waiting " + strconv.Itoa(minutes) + " min")
fmt.Println(time.Now().Local())
time.Sleep(timeToSleep)
}
func waitSeconds(seconds int) {
//wait to avoid the twitter api limitation
timeToSleep := time.Duration(seconds) * time.Second
fmt.Println("waiting " + strconv.Itoa(seconds) + " seconds")
fmt.Println(time.Now().Local())
time.Sleep(timeToSleep)
}