@@ -240,9 +240,9 @@ class ExpressionTimer {
240240 ASTContext &Context;
241241 llvm::TimeRecord StartTime;
242242
243- // / The number of milliseconds from creation until
243+ // / The number of seconds from creation until
244244 // / this timer is considered expired.
245- unsigned ThresholdInMillis ;
245+ unsigned ThresholdInSecs ;
246246
247247 bool PrintDebugTiming;
248248 bool PrintWarning;
@@ -251,7 +251,8 @@ class ExpressionTimer {
251251 // / This constructor sets a default threshold defined for all expressions
252252 // / via compiler flag `solver-expression-time-threshold`.
253253 ExpressionTimer (AnchorType Anchor, ConstraintSystem &CS);
254- ExpressionTimer (AnchorType Anchor, ConstraintSystem &CS, unsigned thresholdInMillis);
254+ ExpressionTimer (AnchorType Anchor, ConstraintSystem &CS,
255+ unsigned thresholdInSecs);
255256
256257 ~ExpressionTimer ();
257258
@@ -272,20 +273,18 @@ class ExpressionTimer {
272273 return endTime.getProcessTime () - StartTime.getProcessTime ();
273274 }
274275
275- // / Return the remaining process time in milliseconds until the
276+ // / Return the remaining process time in seconds until the
276277 // / threshold specified during construction is reached.
277- unsigned getRemainingProcessTimeInMillis () const {
278+ unsigned getRemainingProcessTimeInSeconds () const {
278279 auto elapsed = unsigned (getElapsedProcessTimeInFractionalSeconds ());
279- return elapsed >= ThresholdInMillis ? 0 : ThresholdInMillis - elapsed;
280+ return elapsed >= ThresholdInSecs ? 0 : ThresholdInSecs - elapsed;
280281 }
281282
282283 // Disable emission of warnings about expressions that take longer
283284 // than the warning threshold.
284285 void disableWarning () { PrintWarning = false ; }
285286
286- bool isExpired () const {
287- return getRemainingProcessTimeInMillis () == 0 ;
288- }
287+ bool isExpired () const { return getRemainingProcessTimeInSeconds () == 0 ; }
289288};
290289
291290} // end namespace constraints
0 commit comments