Remove time cast

This commit is contained in:
JimZAH 2023-03-22 11:04:31 +00:00
parent 5e2cfbfbff
commit fa1b3e347f

View File

@ -64,7 +64,7 @@ type Users struct {
type Config struct {
Last_access time.Duration `json:"last_access"`
Page string `json:"page"`
Reload int64 `json:"reload"`
Reload time.Duration `json:"reload"`
Users string `json:"users"`
Users_reload int64 `json:"users_reload"`
}
@ -186,7 +186,7 @@ func main() {
continue
}
if time.Since(last_update) >= time.Second*time.Duration(config.Reload) {
if time.Since(last_update) >= time.Second*config.Reload {
last_update = time.Now()
go scrape(&config, callback)
mu.Lock()