1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00

History every 60 seconds instead of 1

Former-commit-id: 931a0a7c62
This commit is contained in:
Zack Scholl 2017-03-24 07:12:09 -06:00
parent 05f43196c5
commit 9d9918966a

View File

@ -114,7 +114,7 @@ func handlePageRequest(c *gin.Context) {
var versionsChangeSums []int var versionsChangeSums []int
var versionsText []string var versionsText []string
if command[0:2] == "/h" { if command[0:2] == "/h" {
versionsInt64, versionsChangeSums = p.Text.GetMajorSnapshotsAndChangeSums(1) // get snapshots 60 seconds apart versionsInt64, versionsChangeSums = p.Text.GetMajorSnapshotsAndChangeSums(60) // get snapshots 60 seconds apart
versionsText = make([]string, len(versionsInt64)) versionsText = make([]string, len(versionsInt64))
for i, v := range versionsInt64 { for i, v := range versionsInt64 {
versionsText[i] = time.Unix(v/1000000000, 0).Format("Mon Jan 2 15:04:05 MST 2006") versionsText[i] = time.Unix(v/1000000000, 0).Format("Mon Jan 2 15:04:05 MST 2006")