@@ -118,7 +118,7 @@ unpack(std::string& data,
118
118
std::size_t Packing<false ,time_point>::
119
119
packSize (const time_point&, Opm::Parallel::MPIComm comm)
120
120
{
121
- return Packing<true ,std:: time_t >::packSize (std::time_t (), comm);
121
+ return Packing<true , time_point::duration::rep >::packSize (time_point::duration::rep (), comm);
122
122
}
123
123
124
124
void Packing<false ,time_point>::
@@ -127,8 +127,7 @@ pack(const time_point& data,
127
127
std::size_t & position,
128
128
Parallel::MPIComm comm)
129
129
{
130
- Packing<true ,std::time_t >::pack (TimeService::to_time_t (data),
131
- buffer, position, comm);
130
+ Packing<true , time_point::duration::rep>::pack (data.time_since_epoch ().count (), buffer, position, comm);
132
131
}
133
132
134
133
void Packing<false ,time_point>::
@@ -137,9 +136,9 @@ unpack(time_point& data,
137
136
std::size_t & position,
138
137
Parallel::MPIComm comm)
139
138
{
140
- std:: time_t res;
141
- Packing<true ,std:: time_t >::unpack (res, buffer, position, comm);
142
- data = TimeService::from_time_t (res);
139
+ time_point::duration::rep res;
140
+ Packing<true , time_point::duration::rep >::unpack (res, buffer, position, comm);
141
+ data = time_point ( time_point::duration (res) );
143
142
}
144
143
145
144
template struct Packing <false ,std::bitset<3 >>;
0 commit comments