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.

33 lines
602B

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