@@ -240,9 +240,9 @@ class ExpressionTimer {
240
240
ASTContext &Context;
241
241
llvm::TimeRecord StartTime;
242
242
243
- // / The number of milliseconds from creation until
243
+ // / The number of seconds from creation until
244
244
// / this timer is considered expired.
245
- unsigned ThresholdInMillis ;
245
+ unsigned ThresholdInSecs ;
246
246
247
247
bool PrintDebugTiming;
248
248
bool PrintWarning;
@@ -251,7 +251,8 @@ class ExpressionTimer {
251
251
// / This constructor sets a default threshold defined for all expressions
252
252
// / via compiler flag `solver-expression-time-threshold`.
253
253
ExpressionTimer (AnchorType Anchor, ConstraintSystem &CS);
254
- ExpressionTimer (AnchorType Anchor, ConstraintSystem &CS, unsigned thresholdInMillis);
254
+ ExpressionTimer (AnchorType Anchor, ConstraintSystem &CS,
255
+ unsigned thresholdInSecs);
255
256
256
257
~ExpressionTimer ();
257
258
@@ -272,20 +273,18 @@ class ExpressionTimer {
272
273
return endTime.getProcessTime () - StartTime.getProcessTime ();
273
274
}
274
275
275
- // / Return the remaining process time in milliseconds until the
276
+ // / Return the remaining process time in seconds until the
276
277
// / threshold specified during construction is reached.
277
- unsigned getRemainingProcessTimeInMillis () const {
278
+ unsigned getRemainingProcessTimeInSeconds () const {
278
279
auto elapsed = unsigned (getElapsedProcessTimeInFractionalSeconds ());
279
- return elapsed >= ThresholdInMillis ? 0 : ThresholdInMillis - elapsed;
280
+ return elapsed >= ThresholdInSecs ? 0 : ThresholdInSecs - elapsed;
280
281
}
281
282
282
283
// Disable emission of warnings about expressions that take longer
283
284
// than the warning threshold.
284
285
void disableWarning () { PrintWarning = false ; }
285
286
286
- bool isExpired () const {
287
- return getRemainingProcessTimeInMillis () == 0 ;
288
- }
287
+ bool isExpired () const { return getRemainingProcessTimeInSeconds () == 0 ; }
289
288
};
290
289
291
290
} // end namespace constraints
0 commit comments