MCPcopy
hub / github.com/PokemonGoF/PokemonGo-Bot / timeUntil

Function timeUntil

map-chat/javascript/map.js:242–250  ·  view source on GitHub ↗
(now, then)

Source from the content-addressed store, hash-verified

240
241// @ro: to calculate time until expiration
242function timeUntil(now, then) {
243 var timestampNow = Date.parse(now);
244 var timestampThen = Date.parse(then);
245 var diff = new Date(timestampThen - timestampNow);
246
247 diff.setSeconds(Math.round(diff.getSeconds() / 30) * 30);
248
249 return diff;
250}
251
252function displayMessageOnMap(msg, olat, olong, sessid, icostr, expir, pokenick) {
253 // @ro: passing values split from incoming payload into two variables for now (lat and long)

Callers

nothing calls this directly

Calls 2

parseMethod · 0.45
getSecondsMethod · 0.45

Tested by

no test coverage detected