You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
531B

  1. //! Tools to record and display what's happening in your program
  2. //!
  3. extern crate zmq;
  4. extern crate influent;
  5. extern crate chrono;
  6. extern crate hyper;
  7. extern crate termion;
  8. extern crate pub_sub;
  9. extern crate windows;
  10. use chrono::{DateTime, Utc};
  11. pub mod influx;
  12. pub mod warnings;
  13. pub mod latency;
  14. /// converts a chrono::DateTime to an integer timestamp (ns)
  15. ///
  16. pub fn nanos(t: DateTime<Utc>) -> u64 {
  17. (t.timestamp() as u64) * 1_000_000_000_u64 + (t.timestamp_subsec_nanos() as u64)
  18. }
  19. // #[cfg(test)]
  20. // mod tests {
  21. // }