@@ -11,12 +11,18 @@ use crate::time::Time;
11
11
///
12
12
/// It is automatically inserted as a resource by
13
13
/// [`TimePlugin`](crate::TimePlugin) and updated with time instants according
14
- /// to [`TimeUpdateStrategy`](crate::TimeUpdateStrategy).
14
+ /// to [`TimeUpdateStrategy`](crate::TimeUpdateStrategy).[^disclaimer]
15
+ ///
16
+ /// Note:
17
+ /// Using [`TimeUpdateStrategy::ManualDuration`](crate::TimeUpdateStrategy::ManualDuration)
18
+ /// allows for mocking the wall clock for testing purposes.
19
+ /// Besides this use case, it is not recommended to do this, as it will no longer
20
+ /// represent "wall clock" time as intended.
15
21
///
16
22
/// The [`delta()`](Time::delta) and [`elapsed()`](Time::elapsed) values of this
17
23
/// clock should be used for anything which deals specifically with real time
18
24
/// (wall clock time). It will not be affected by relative game speed
19
- /// adjustments, pausing or other adjustments.
25
+ /// adjustments, pausing or other adjustments.[^disclaimer]
20
26
///
21
27
/// The clock does not count time from [`startup()`](Time::startup) to
22
28
/// [`first_update()`](Time::first_update()) into elapsed, but instead will
@@ -29,6 +35,10 @@ use crate::time::Time;
29
35
/// [`Instant`]s for [`startup()`](Time::startup),
30
36
/// [`first_update()`](Time::first_update) and
31
37
/// [`last_update()`](Time::last_update) are recorded and accessible.
38
+ ///
39
+ /// [^disclaimer]: When using [`TimeUpdateStrategy::ManualDuration`](crate::TimeUpdateStrategy::ManualDuration),
40
+ /// [`Time<Real>#impl-Time<Real>`] is only a *mock* of wall clock time.
41
+ ///
32
42
#[ derive( Debug , Copy , Clone ) ]
33
43
#[ cfg_attr( feature = "bevy_reflect" , derive( Reflect ) ) ]
34
44
pub struct Real {
0 commit comments