|
|
|
@ -31,8 +31,23 @@ function initialize(options){ |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
/*section: dogapi |
|
|
|
*comment: get the current POSIX timestamp |
|
|
|
*example: | |
|
|
|
* ```javascript
|
|
|
|
* var dogapi = require("dogapi"); |
|
|
|
* dogapi.now(); |
|
|
|
* // this is the same as
|
|
|
|
* parseInt(new Date().getTime() / 1000); |
|
|
|
* ```
|
|
|
|
*/ |
|
|
|
function now(){ |
|
|
|
return parseInt(new Date().getTime() / 1000); |
|
|
|
}; |
|
|
|
|
|
|
|
module.exports.client = require("./client"), |
|
|
|
module.exports.initialize = initialize; |
|
|
|
module.exports.now = now; |
|
|
|
module.exports.OK = 0; |
|
|
|
module.exports.WARNING = 1; |
|
|
|
module.exports.CRITICAL = 2; |
|
|
|
|