Skip to content
This repository was archived by the owner on Jul 6, 2022. It is now read-only.

Commit f360f51

Browse files
committed
Making poll timestamps rounded to the nearest 5.
1 parent b5010d7 commit f360f51

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

app/js/Server.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ var Server = {
7171
},
7272

7373
poll: function (callback) {
74-
Server.ajaxGet('/poll/' + Data.state.lastPollTs, function (error, data) {
74+
var lastPoll = Math.round(Data.state.lastPollTs / 5) * 5;
75+
76+
Server.ajaxGet('/poll/' + lastPoll, function (error, data) {
7577
if (error) return callback(error);
7678

7779
Data.state.lastPollTs = data.ts;

0 commit comments

Comments
 (0)