From 87222b1fda30757256248e078e66571680d283e4 Mon Sep 17 00:00:00 2001 From: Thomas Lackner Date: Sun, 6 Jan 2013 23:28:56 -0600 Subject: [PATCH] SnaphaxApi->time() - higher precision system time needed for some api calls --- snaphax.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/snaphax.php b/snaphax.php index daa7bc8..1010dc4 100644 --- a/snaphax.php +++ b/snaphax.php @@ -59,7 +59,7 @@ $this->auth_token = false; } function login() { - $ts = time(); + $ts = $this->api->time(); $out = $this->api->postCall( '/ph/login', array( @@ -194,6 +194,11 @@ $this->debug("out: $out"); return $out; } + + function time() { + return round(microtime(true) * 1000); + } + }