riftenlabs-indexer/src/timeutil.rs
Dagur Valberg Johannsson 1b38f65224
Add 'valuelocked' endpoints
2024-04-03 21:44:42 +02:00

13 lines
424 B
Rust

// Copyright (C) 2024 Riften Labs AS
//
// This software is licensed under the GNU Affero General Public License (AGPL), version 3.0 or later.
// A copy of the license can be found in the LICENSE file or at https://www.gnu.org/licenses/agpl-3.0.html
use std::time::{SystemTime, UNIX_EPOCH};
pub fn time_now() -> i64 {
SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_secs() as i64
}