mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 04:21:51 +00:00
data persistence for all data
This commit is contained in:
1 parent
0f6f0d1bc9
commit
4bee62741f
5 files changed
+282
-89
No files matched your search
@@ -35,6 +35,16 @@
|
||||
|
||||
namespace dht {
|
||||
|
||||
time_point from_time_t(std::time_t t) {
|
||||
return clock::now() + (std::chrono::system_clock::from_time_t(t) - std::chrono::system_clock::now());
|
||||
}
|
||||
|
||||
std::time_t to_time_t(time_point t) {
|
||||
return std::chrono::system_clock::to_time_t(std::chrono::system_clock::now() +
|
||||
(t - clock::now()));
|
||||
}
|
||||
|
||||
|
||||
std::ostream& operator<< (std::ostream& s, const Value& v)
|
||||
{
|
||||
s << "Value[id:" << std::hex << v.id << std::dec << " ";
|
||||
|
||||
Reference in new issue
Block a user