andris9/simpleStorage — pull request #4 by avdg (2014-04-03 14:43:06+00:00)
Title: Fix timer overflow

This pull request fixes an issue where the timer was triggered immediately given a very big timeout.

To give an example of the bug:

```javascript
function changeSetting(key, value) {
simpleStorage.set(key, value, {TTL: 180*24*60*60*1000}); // 180 days or around 6 months of storage!
}

changeSetting('foo', 'bar');
```

In chrome, this simple piece of code is enough to make the timer timeout after its set.

There are no unit tests because this fixes an issue with timers and timers aren't tested anyway. This pull request shouldn't change the state of simplestorage anyway...

References: http://stackoverflow.com/questions/3468607/why-does-settimeout-break-for-large-millisecond-delay-values