mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +01:00
ircd::db::env: Add NowNanos() override.
This commit is contained in:
parent
4b831a6a30
commit
ad1940d614
2 changed files with 8 additions and 0 deletions
1
include/ircd/db/database/env/env.h
vendored
1
include/ircd/db/database/env/env.h
vendored
|
@ -76,6 +76,7 @@ struct ircd::db::database::env final
|
|||
unsigned int GetThreadPoolQueueLen(Priority pri = LOW) const noexcept override;
|
||||
Status GetTestDirectory(std::string* path) noexcept override;
|
||||
Status NewLogger(const std::string& fname, std::shared_ptr<Logger>* result) noexcept override;
|
||||
uint64_t NowNanos() noexcept override;
|
||||
uint64_t NowMicros() noexcept override;
|
||||
void SleepForMicroseconds(int micros) noexcept override;
|
||||
Status GetHostName(char* name, uint64_t len) noexcept override;
|
||||
|
|
|
@ -730,6 +730,13 @@ catch(const std::exception &e)
|
|||
};
|
||||
}
|
||||
|
||||
uint64_t
|
||||
ircd::db::database::env::NowNanos()
|
||||
noexcept
|
||||
{
|
||||
return duration_cast<nanoseconds>(ircd::now<steady_point>().time_since_epoch()).count();
|
||||
}
|
||||
|
||||
rocksdb::Status
|
||||
ircd::db::database::env::GetCurrentTime(int64_t *const unix_time)
|
||||
noexcept try
|
||||
|
|
Loading…
Reference in a new issue