Skip to content

Commit 3b228c0

Browse files
committed
modify time unit
1 parent b9835d7 commit 3b228c0

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

lib/src/constraint_layout.dart

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1712,11 +1712,11 @@ class _ConstraintRenderBox extends RenderBox
17121712
void performLayout() {
17131713
int startTime = 0;
17141714
if (_releasePrintLayoutTime && kReleaseMode) {
1715-
startTime = DateTime.now().microsecondsSinceEpoch;
1715+
startTime = DateTime.now().millisecondsSinceEpoch;
17161716
}
17171717
assert(() {
17181718
if (_debugPrintLayoutTime) {
1719-
startTime = DateTime.now().microsecondsSinceEpoch;
1719+
startTime = DateTime.now().millisecondsSinceEpoch;
17201720
}
17211721
return true;
17221722
}());
@@ -1874,13 +1874,13 @@ class _ConstraintRenderBox extends RenderBox
18741874
_layoutByConstrainedNodeTrees();
18751875

18761876
if (_releasePrintLayoutTime && kReleaseMode) {
1877-
layoutTimeUsage.add(DateTime.now().microsecondsSinceEpoch - startTime);
1877+
layoutTimeUsage.add(DateTime.now().millisecondsSinceEpoch - startTime);
18781878
if (layoutTimeUsage.length > maxTimeUsage) {
18791879
layoutTimeUsage.removeFirst();
18801880
}
18811881
}
18821882
assert(() {
1883-
layoutTimeUsage.add(DateTime.now().microsecondsSinceEpoch - startTime);
1883+
layoutTimeUsage.add(DateTime.now().millisecondsSinceEpoch - startTime);
18841884
if (layoutTimeUsage.length > maxTimeUsage) {
18851885
layoutTimeUsage.removeFirst();
18861886
}
@@ -2455,11 +2455,11 @@ class _ConstraintRenderBox extends RenderBox
24552455
) {
24562456
int startTime = 0;
24572457
if (_releasePrintLayoutTime && kReleaseMode) {
2458-
startTime = DateTime.now().microsecondsSinceEpoch;
2458+
startTime = DateTime.now().millisecondsSinceEpoch;
24592459
}
24602460
assert(() {
24612461
if (_debugPrintLayoutTime) {
2462-
startTime = DateTime.now().microsecondsSinceEpoch;
2462+
startTime = DateTime.now().millisecondsSinceEpoch;
24632463
}
24642464
return true;
24652465
}());
@@ -2560,15 +2560,15 @@ class _ConstraintRenderBox extends RenderBox
25602560
}());
25612561

25622562
if (_releasePrintLayoutTime && kReleaseMode) {
2563-
paintTimeUsage.add(DateTime.now().microsecondsSinceEpoch - startTime);
2563+
paintTimeUsage.add(DateTime.now().millisecondsSinceEpoch - startTime);
25642564
if (paintTimeUsage.length > maxTimeUsage) {
25652565
paintTimeUsage.removeFirst();
25662566
}
25672567
_debugShowPerformance(context, offset);
25682568
}
25692569
assert(() {
25702570
if (_debugPrintLayoutTime) {
2571-
paintTimeUsage.add(DateTime.now().microsecondsSinceEpoch - startTime);
2571+
paintTimeUsage.add(DateTime.now().millisecondsSinceEpoch - startTime);
25722572
if (paintTimeUsage.length > maxTimeUsage) {
25732573
paintTimeUsage.removeFirst();
25742574
}
@@ -2600,7 +2600,7 @@ class _ConstraintRenderBox extends RenderBox
26002600
color: Colors.green,
26012601
));
26022602
}
2603-
paragraphBuilder.addText("layout $layoutTime us");
2603+
paragraphBuilder.addText("layout $layoutTime ms");
26042604
ui.Paragraph paragraph = paragraphBuilder.build();
26052605
paragraph.layout(const ui.ParagraphConstraints(
26062606
width: 80,
@@ -2628,7 +2628,7 @@ class _ConstraintRenderBox extends RenderBox
26282628
color: Colors.green,
26292629
));
26302630
}
2631-
paragraphBuilder.addText("paint $paintTime us");
2631+
paragraphBuilder.addText("paint $paintTime ms");
26322632
ui.Paragraph paragraph = paragraphBuilder.build();
26332633
paragraph.layout(const ui.ParagraphConstraints(
26342634
width: 80,

0 commit comments

Comments
 (0)