librime: fs.h Source File

| 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 {
7 namespace filesystem {
8
9template <typename TP>
10 inline 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_
rime
Definition algebra.cc:12
rime::filesystem
Definition fs.h:7
rime::filesystem::to_time_t
std::time_t to_time_t(TP tp)
Definition fs.h:10