mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-03-11 16:35:13 +00:00
Update http.js
This commit is contained in:
parent
5d1817eef3
commit
5681852902
|
@ -33,11 +33,11 @@ var HTTPObject = function(engine) {
|
|||
"base64json": function(v) {
|
||||
return BASE64.encode(JSON.stringify(v));
|
||||
},
|
||||
"unixnow": function(diff) {
|
||||
"unixnow": function(diff) { // e.g. {unixtime -300} (seconds)
|
||||
var t = parseInt(diff);
|
||||
return Math.floor(new Date().getTime() / 1000) - t;
|
||||
},
|
||||
"unixnowms": function(diff) {
|
||||
"unixnowms": function(diff) { // e.g. {unixtimems -300000} (milliseconds)
|
||||
var t = parseInt(diff);
|
||||
return new Date().getTime() - t;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user