* Whether we should write a new timestamp to the stored cid value. * We say yes if it is older than 1 day, so we only do this max once * per day to avoid writing to localStorage all the time. * @param {!BaseCidInfoDef} storedCidInfo * @return {boolean}
(storedCidInfo)
| 671 | * @return {boolean} |
| 672 | */ |
| 673 | function shouldUpdateStoredTime(storedCidInfo) { |
| 674 | const createdTime = storedCidInfo.time; |
| 675 | const now = Date.now(); |
| 676 | return createdTime + ONE_DAY_MILLIS < now; |
| 677 | } |
| 678 | |
| 679 | /** |
| 680 | * Returns an array with a total of 128 of random values based on the |