decode_exactly

Function decode_exactly 

Source
pub fn decode_exactly(timehash: &str) -> Result<(f64, f64), String>
Expand description

Decode timehash, returning a tuple of floating point value for epoch seconds and the plus/minus error for epoch seconds. Returns a tuple of (epoch_seconds, error_margin).

ยงExamples

use timeharsh::timehash;
assert_eq!(timehash::decode_exactly("abcdef").unwrap(), (1236532473.6328125, 7704.4921875));