Created
February 17, 2015 22:39
-
-
Save jz5/d82978c0f36296b68a5f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 現時刻の status id | |
var currentId = Convert.ToInt64( | |
DateTime.UtcNow.Subtract( | |
new DateTime(1970, 1, 1).AddMilliseconds(1288834974657) | |
).TotalMilliseconds | |
) << 22; | |
// 10 minutes 分のミリ秒 | |
var offset = Convert.ToInt64( | |
TimeSpan.FromMinutes(10).TotalMilliseconds) << 22; | |
// 10分前の status id | |
var pastId = currentId - offset; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment