Skip to content

Instantly share code, notes, and snippets.

@surgicalmaskman
Created June 5, 2013 22:33
Show Gist options
  • Save surgicalmaskman/5717866 to your computer and use it in GitHub Desktop.
Save surgicalmaskman/5717866 to your computer and use it in GitHub Desktop.
#!/usr/local/bin/python
# -*- coding: utf-8 -*-
import datetime
if __name__ == "__main__":
now = datetime.datetime.utcnow()
day = now.day
hour = now.hour
min = now.minute
sec = now.second
beat = ((hour * 3600 + (min +60) *60 + sec) * 1000) / 86400
if beat > 1000:
beat -= 1000
if beat < 0:
beat += 1000
print beat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment