3 ms·
Yeah it's just a matter of saving space. Here's the actual code: https://github.com/lmatteis/peer-tweet/blob/master/app/components/Tweet.js#L77 https://github.c
by sktrdie 11y ago
Yeah it's just a matter of saving space. Here's the actual code: https://github.com/lmatteis/peer-tweet/blob/master/app/components/Tweet.js#L77 https://github.com/lmatteis/peer-tweet/blob/master/app/compo...
I'm really bad at binary arithmetic so I might have done something wrong, but essentially I calculate how many bytes I need to use for the integer, and I store it in a buffer.
I might change this if the space required is the same for seconds. I just figured I'd save some space, and I only need minute precision really.
- dTal 11y agoMy personal intuition is that the tiny space savings isn't worth the creation of a new timestamp format that will undoubtedly cause frustration down the line, if this catches on.