librime 1.2
Rime Input Method Engine, the core library
fs.h
Go to the documentation of this file.
1#ifndef RIME_FS_H_
2#define RIME_FS_H_
3
4#include <chrono>
5
6namespace rime {
7namespace filesystem {
8
9template <typename TP>
10inline std::time_t to_time_t(TP tp) {
11 using namespace std::chrono;
12 auto sctp = time_point_cast<system_clock::duration>(tp - TP::clock::now() +
13 system_clock::now());
14 return system_clock::to_time_t(sctp);
15}
16
17} // namespace filesystem
18} // namespace rime
19
20#endif // RIME_FS_H_
Definition algebra.cc:12
Definition fs.h:7
std::time_t to_time_t(TP tp)
Definition fs.h:10