1e41f4b71Sopenharmony_ci# TextTimer
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ciThe **TextTimer** component displays timing information and is controlled in text format.
4e41f4b71Sopenharmony_ci
5e41f4b71Sopenharmony_ci>  **NOTE**
6e41f4b71Sopenharmony_ci>
7e41f4b71Sopenharmony_ci> This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
8e41f4b71Sopenharmony_ci
9e41f4b71Sopenharmony_ci## Child Components
10e41f4b71Sopenharmony_ci
11e41f4b71Sopenharmony_ciNot supported
12e41f4b71Sopenharmony_ci
13e41f4b71Sopenharmony_ci## APIs
14e41f4b71Sopenharmony_ci
15e41f4b71Sopenharmony_ciTextTimer(options?: TextTimerOptions)
16e41f4b71Sopenharmony_ci
17e41f4b71Sopenharmony_ci**Widget capability**: Since API version 10, this API is supported in ArkTS widgets.
18e41f4b71Sopenharmony_ci
19e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 11.
20e41f4b71Sopenharmony_ci
21e41f4b71Sopenharmony_ci**Parameters**
22e41f4b71Sopenharmony_ci
23e41f4b71Sopenharmony_ci| Name| Type| Mandatory| Description|
24e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
25e41f4b71Sopenharmony_ci| options |  [TextTimerOptions](#texttimeroptions)| No| Parameters of the **TextTimer** component.|
26e41f4b71Sopenharmony_ci
27e41f4b71Sopenharmony_ci## TextTimerOptions
28e41f4b71Sopenharmony_ci
29e41f4b71Sopenharmony_ci**Widget capability**: Since API version 10, this API is supported in ArkTS widgets.
30e41f4b71Sopenharmony_ci
31e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 11.
32e41f4b71Sopenharmony_ci
33e41f4b71Sopenharmony_ci| Name    | Type    | Mandatory | Description                  |
34e41f4b71Sopenharmony_ci| ----------- | -------- | -------- | -------- |
35e41f4b71Sopenharmony_ci| isCountDown | boolean  | No  | Whether to count down.<br>Default value: **false**|
36e41f4b71Sopenharmony_ci| count       | number   | No  | Countdown time, in milliseconds. This parameter is valid only when **isCountDown** is set to **true**. The maximum value is 86400000 ms (24 hours). In the case of 0 < Value of **count** < 86400000, the value of **count** is used as the initial countdown value. In other cases, the default value is used as the initial countdown value.<br>Default value: **60000**|
37e41f4b71Sopenharmony_ci| controller  | [TextTimerController](#texttimercontroller) | No | **TextTimer** controller.|
38e41f4b71Sopenharmony_ci
39e41f4b71Sopenharmony_ci## Attributes
40e41f4b71Sopenharmony_ci
41e41f4b71Sopenharmony_ciAmong the [universal attributes](ts-universal-attributes-size.md) and [universal text attributes](ts-universal-attributes-text-style.md), **fontColor**, **fontSize**, **fontStyle**, **fontWeight**, and **fontFamily** are supported. In addition, the following attributes are supported.
42e41f4b71Sopenharmony_ci
43e41f4b71Sopenharmony_ci### format
44e41f4b71Sopenharmony_ci
45e41f4b71Sopenharmony_ciformat(value: string)
46e41f4b71Sopenharmony_ci
47e41f4b71Sopenharmony_ciSets the custom format. The value must contain at least one of the following keywords: **HH**, mm, **ss**, and **SS**. If the specified date format is yy, MM, or dd, the default value is used instead.
48e41f4b71Sopenharmony_ci
49e41f4b71Sopenharmony_ci**Widget capability**: Since API version 10, this API is supported in ArkTS widgets.
50e41f4b71Sopenharmony_ci
51e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 11.
52e41f4b71Sopenharmony_ci
53e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
54e41f4b71Sopenharmony_ci
55e41f4b71Sopenharmony_ci**Parameters**
56e41f4b71Sopenharmony_ci
57e41f4b71Sopenharmony_ci| Name| Type  | Mandatory| Description                                  |
58e41f4b71Sopenharmony_ci| ------ | ------ | ---- | -------------------------------------- |
59e41f4b71Sopenharmony_ci| value  | string | Yes  | Custom format<br>Default value: **'HH:mm:ss.SS'**|
60e41f4b71Sopenharmony_ci
61e41f4b71Sopenharmony_ci### textShadow<sup>11+</sup>
62e41f4b71Sopenharmony_ci
63e41f4b71Sopenharmony_citextShadow(value: ShadowOptions | Array&lt;ShadowOptions&gt;)
64e41f4b71Sopenharmony_ci
65e41f4b71Sopenharmony_ciSets the text shadow. It supports input parameters in an array to implement multiple text shadows. This API does not work with the **fill** attribute or coloring strategy.
66e41f4b71Sopenharmony_ci
67e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12.
68e41f4b71Sopenharmony_ci
69e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
70e41f4b71Sopenharmony_ci
71e41f4b71Sopenharmony_ci**Parameters**
72e41f4b71Sopenharmony_ci
73e41f4b71Sopenharmony_ci| Name| Type                                                        | Mandatory| Description          |
74e41f4b71Sopenharmony_ci| ------ | ------------------------------------------------------------ | ---- | -------------- |
75e41f4b71Sopenharmony_ci| value  | [ShadowOptions](ts-universal-attributes-image-effect.md#shadowoptions) \| Array&lt;[ShadowOptions](ts-universal-attributes-image-effect.md#shadowoptions)> | Yes  | Text shadow.|
76e41f4b71Sopenharmony_ci
77e41f4b71Sopenharmony_ci### contentModifier<sup>12+</sup>
78e41f4b71Sopenharmony_ci
79e41f4b71Sopenharmony_cicontentModifier(modifier: ContentModifier\<TextTimerConfiguration>)
80e41f4b71Sopenharmony_ci
81e41f4b71Sopenharmony_ciCreates a content modifier.
82e41f4b71Sopenharmony_ci
83e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12.
84e41f4b71Sopenharmony_ci
85e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
86e41f4b71Sopenharmony_ci
87e41f4b71Sopenharmony_ci**Parameters**
88e41f4b71Sopenharmony_ci
89e41f4b71Sopenharmony_ci| Name| Type                                         | Mandatory| Description                                            |
90e41f4b71Sopenharmony_ci| ------ | --------------------------------------------- | ---- | ------------------------------------------------ |
91e41f4b71Sopenharmony_ci| modifier  | [ContentModifier\<TextTimerConfiguration>](#texttimerconfiguration12) | Yes  | Content modifier to apply to the **TextTimer** component.<br>**modifier**: content modifier. You need a custom class to implement the **ContentModifier** API.|
92e41f4b71Sopenharmony_ci
93e41f4b71Sopenharmony_ci## Events
94e41f4b71Sopenharmony_ci
95e41f4b71Sopenharmony_ci### onTimer
96e41f4b71Sopenharmony_ci
97e41f4b71Sopenharmony_cionTimer(event: (utc: number, elapsedTime: number) =&gt; void)
98e41f4b71Sopenharmony_ci
99e41f4b71Sopenharmony_ciTriggered when the time text changes. This event is not triggered when the screen is locked or the application is running in the background.
100e41f4b71Sopenharmony_ci
101e41f4b71Sopenharmony_ci**Widget capability**: Since API version 10, this API is supported in ArkTS widgets.
102e41f4b71Sopenharmony_ci
103e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 11.
104e41f4b71Sopenharmony_ci
105e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
106e41f4b71Sopenharmony_ci
107e41f4b71Sopenharmony_ci**Parameters**
108e41f4b71Sopenharmony_ci
109e41f4b71Sopenharmony_ci| Name     | Type  | Mandatory| Description                                                        |
110e41f4b71Sopenharmony_ci| ----------- | ------ | ---- | ------------------------------------------------------------ |
111e41f4b71Sopenharmony_ci| utc         | number | Yes  | Linux timestamp, which is the amount of time that has elapsed since January 1, 1970, in the minimum unit of the format.|
112e41f4b71Sopenharmony_ci| elapsedTime | number | Yes  | Elapsed time of the timer, in the minimum unit of the format.                |
113e41f4b71Sopenharmony_ci
114e41f4b71Sopenharmony_ci## TextTimerController
115e41f4b71Sopenharmony_ci
116e41f4b71Sopenharmony_ciImplements a controller for controlling the **TextTimer** component. A **TextTimer** component can only be bound to one controller, and the relevant commands can only be called after the component has been created.
117e41f4b71Sopenharmony_ci
118e41f4b71Sopenharmony_ci**Widget capability**: Since API version 10, this API is supported in ArkTS widgets.
119e41f4b71Sopenharmony_ci
120e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 11.
121e41f4b71Sopenharmony_ci
122e41f4b71Sopenharmony_ci### Objects to Import
123e41f4b71Sopenharmony_ci
124e41f4b71Sopenharmony_ci```
125e41f4b71Sopenharmony_citextTimerController: TextTimerController = new TextTimerController()
126e41f4b71Sopenharmony_ci```
127e41f4b71Sopenharmony_ci
128e41f4b71Sopenharmony_ci### start
129e41f4b71Sopenharmony_ci
130e41f4b71Sopenharmony_cistart()
131e41f4b71Sopenharmony_ci
132e41f4b71Sopenharmony_ciStarts the timer.
133e41f4b71Sopenharmony_ci
134e41f4b71Sopenharmony_ci**Widget capability**: Since API version 10, this API is supported in ArkTS widgets.
135e41f4b71Sopenharmony_ci
136e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 11.
137e41f4b71Sopenharmony_ci
138e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
139e41f4b71Sopenharmony_ci
140e41f4b71Sopenharmony_ci### pause
141e41f4b71Sopenharmony_ci
142e41f4b71Sopenharmony_cipause()
143e41f4b71Sopenharmony_ci
144e41f4b71Sopenharmony_ciPauses the timer.
145e41f4b71Sopenharmony_ci
146e41f4b71Sopenharmony_ci**Widget capability**: Since API version 10, this API is supported in ArkTS widgets.
147e41f4b71Sopenharmony_ci
148e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 11.
149e41f4b71Sopenharmony_ci
150e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
151e41f4b71Sopenharmony_ci
152e41f4b71Sopenharmony_ci### reset
153e41f4b71Sopenharmony_ci
154e41f4b71Sopenharmony_cireset()
155e41f4b71Sopenharmony_ci
156e41f4b71Sopenharmony_ciResets the timer.
157e41f4b71Sopenharmony_ci
158e41f4b71Sopenharmony_ci**Widget capability**: Since API version 10, this API is supported in ArkTS widgets.
159e41f4b71Sopenharmony_ci
160e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 11.
161e41f4b71Sopenharmony_ci
162e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
163e41f4b71Sopenharmony_ci
164e41f4b71Sopenharmony_ci## TextTimerConfiguration<sup>12+</sup>
165e41f4b71Sopenharmony_ci
166e41f4b71Sopenharmony_ciYou need a custom class to implement the **ContentModifier** API.
167e41f4b71Sopenharmony_ci
168e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12.
169e41f4b71Sopenharmony_ci
170e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
171e41f4b71Sopenharmony_ci
172e41f4b71Sopenharmony_ci| Name | Type   |    Default Value     |  Description             |
173e41f4b71Sopenharmony_ci| ------ | ------ | ------ |-------------------------------- |
174e41f4b71Sopenharmony_ci| count | number | 60000 | Countdown time, in milliseconds. This parameter is valid only when **isCountDown** is set to **true**. The maximum value is 86400000 ms (24 hours). If the value is between 0 and 86,400,000, it is used as the initial countdown time. Otherwise, the default value is used as the initial countdown time.|
175e41f4b71Sopenharmony_ci| isCountDown | boolean| false | Whether to count down.|
176e41f4b71Sopenharmony_ci| started | boolean | - | Whether the countdown has started.|
177e41f4b71Sopenharmony_ci| elapsedTime | number | - | Elapsed time of the timer, in the minimum unit of the format.|
178e41f4b71Sopenharmony_ci
179e41f4b71Sopenharmony_ci## Example
180e41f4b71Sopenharmony_ci### Example 1
181e41f4b71Sopenharmony_ci```ts
182e41f4b71Sopenharmony_ci// xxx.ets
183e41f4b71Sopenharmony_ci@Entry
184e41f4b71Sopenharmony_ci@Component
185e41f4b71Sopenharmony_cistruct TextTimerExample {
186e41f4b71Sopenharmony_ci  textTimerController: TextTimerController = new TextTimerController()
187e41f4b71Sopenharmony_ci  @State format: string = 'mm:ss.SS'
188e41f4b71Sopenharmony_ci
189e41f4b71Sopenharmony_ci  build() {
190e41f4b71Sopenharmony_ci    Column() {
191e41f4b71Sopenharmony_ci      TextTimer({ isCountDown: true, count: 30000, controller: this.textTimerController })
192e41f4b71Sopenharmony_ci        .format(this.format)
193e41f4b71Sopenharmony_ci        .fontColor(Color.Black)
194e41f4b71Sopenharmony_ci        .fontSize(50)
195e41f4b71Sopenharmony_ci        .onTimer((utc: number, elapsedTime: number) => {
196e41f4b71Sopenharmony_ci          console.info('textTimer notCountDown utc is: ' + utc + ', elapsedTime: ' + elapsedTime)
197e41f4b71Sopenharmony_ci        })
198e41f4b71Sopenharmony_ci      Row() {
199e41f4b71Sopenharmony_ci        Button("start").onClick(() => {
200e41f4b71Sopenharmony_ci          this.textTimerController.start()
201e41f4b71Sopenharmony_ci        })
202e41f4b71Sopenharmony_ci        Button("pause").onClick(() => {
203e41f4b71Sopenharmony_ci          this.textTimerController.pause()
204e41f4b71Sopenharmony_ci        })
205e41f4b71Sopenharmony_ci        Button("reset").onClick(() => {
206e41f4b71Sopenharmony_ci          this.textTimerController.reset()
207e41f4b71Sopenharmony_ci        })
208e41f4b71Sopenharmony_ci      }
209e41f4b71Sopenharmony_ci    }
210e41f4b71Sopenharmony_ci  }
211e41f4b71Sopenharmony_ci}
212e41f4b71Sopenharmony_ci```
213e41f4b71Sopenharmony_ci
214e41f4b71Sopenharmony_ci
215e41f4b71Sopenharmony_ci![en-us_image_0000001257138345](figures/en-us_image_0000001257138345.gif)
216e41f4b71Sopenharmony_ci
217e41f4b71Sopenharmony_ci### Example 2
218e41f4b71Sopenharmony_ci``` ts
219e41f4b71Sopenharmony_ci// xxx.ets
220e41f4b71Sopenharmony_ci@Entry
221e41f4b71Sopenharmony_ci@Component
222e41f4b71Sopenharmony_cistruct TextTimerExample {
223e41f4b71Sopenharmony_ci  @State textShadows : ShadowOptions | Array<ShadowOptions> = [{ radius: 10, color: Color.Red, offsetX: 10, offsetY: 0 },{ radius: 10, color: Color.Black, offsetX: 20, offsetY: 0 },
224e41f4b71Sopenharmony_ci      { radius: 10, color: Color.Brown, offsetX: 30, offsetY: 0 },{ radius: 10, color: Color.Green, offsetX: 40, offsetY: 0 },
225e41f4b71Sopenharmony_ci      { radius: 10, color: Color.Yellow, offsetX: 100, offsetY: 0 }]
226e41f4b71Sopenharmony_ci  build() {
227e41f4b71Sopenharmony_ci    Column({ space: 8 }) {
228e41f4b71Sopenharmony_ci      TextTimer().fontSize(50).textShadow(this.textShadows)
229e41f4b71Sopenharmony_ci    }
230e41f4b71Sopenharmony_ci  }
231e41f4b71Sopenharmony_ci}
232e41f4b71Sopenharmony_ci```
233e41f4b71Sopenharmony_ci![TextshadowExample](figures/text_timer_textshadow.png)
234e41f4b71Sopenharmony_ci
235e41f4b71Sopenharmony_ci### Example 3
236e41f4b71Sopenharmony_ciThis example showcases two simple **TextTimer** components set against a light gray background. Once the timers are activated, they display the time progression in real-time. When the countdown timer starts, the background turns black; when the count-up timer starts, the background turns gray.
237e41f4b71Sopenharmony_ci``` ts
238e41f4b71Sopenharmony_ci// xxx.ets
239e41f4b71Sopenharmony_ciclass MyTextTimerModifier implements ContentModifier<TextTimerConfiguration> {
240e41f4b71Sopenharmony_ci  constructor() {
241e41f4b71Sopenharmony_ci  }
242e41f4b71Sopenharmony_ci  applyContent() : WrappedBuilder<[TextTimerConfiguration]>
243e41f4b71Sopenharmony_ci  {
244e41f4b71Sopenharmony_ci      return wrapBuilder(buildTextTimer)
245e41f4b71Sopenharmony_ci  }
246e41f4b71Sopenharmony_ci}
247e41f4b71Sopenharmony_ci
248e41f4b71Sopenharmony_ci@Builder function buildTextTimer(config: TextTimerConfiguration) {
249e41f4b71Sopenharmony_ci  Column() {
250e41f4b71Sopenharmony_ci     Stack({ alignContent: Alignment.Center }) {
251e41f4b71Sopenharmony_ci       Circle({ width: 150, height: 150 }).fill(config.started ? (config.isCountDown ? 0xFF232323 : 0xFF717171) : 0xFF929292)
252e41f4b71Sopenharmony_ci       Column(){
253e41f4b71Sopenharmony_ci         Text(config.isCountDown ? "Countdown" : "Count-up").fontColor(Color.White)
254e41f4b71Sopenharmony_ci         Text(
255e41f4b71Sopenharmony_ci           (config.isCountDown ? "Remaining" : "Elapsed") + (config.isCountDown?
256e41f4b71Sopenharmony_ci             (Math.max(config.count / 1000 - config.elapsedTime / 100,0)).toFixed(1) + "/" + (config.count / 1000).toFixed(0)
257e41f4b71Sopenharmony_ci             :((config.elapsedTime / 100).toFixed(0))
258e41f4b71Sopenharmony_ci           ) + "s"
259e41f4b71Sopenharmony_ci         ).fontColor(Color.White)
260e41f4b71Sopenharmony_ci       }
261e41f4b71Sopenharmony_ci     }
262e41f4b71Sopenharmony_ci  }
263e41f4b71Sopenharmony_ci}
264e41f4b71Sopenharmony_ci
265e41f4b71Sopenharmony_ci@Entry
266e41f4b71Sopenharmony_ci@Component
267e41f4b71Sopenharmony_cistruct Index {
268e41f4b71Sopenharmony_ci  @State count: number = 10000
269e41f4b71Sopenharmony_ci  @State myTimerModifier: MyTextTimerModifier = new MyTextTimerModifier()
270e41f4b71Sopenharmony_ci  countDownTextTimerController: TextTimerController = new TextTimerController()
271e41f4b71Sopenharmony_ci  countUpTextTimerController: TextTimerController = new TextTimerController()
272e41f4b71Sopenharmony_ci
273e41f4b71Sopenharmony_ci  build() {
274e41f4b71Sopenharmony_ci    Row() {
275e41f4b71Sopenharmony_ci      Column() {
276e41f4b71Sopenharmony_ci        TextTimer({isCountDown: true, count: this.count, controller: this.countDownTextTimerController})
277e41f4b71Sopenharmony_ci          .contentModifier(this.myTimerModifier)
278e41f4b71Sopenharmony_ci          .onTimer((utc: number, elapsedTime: number) => {
279e41f4b71Sopenharmony_ci            console.info('textTimer onTimer utc is:' + utc + ', elapsedTime: ' + elapsedTime)
280e41f4b71Sopenharmony_ci          })
281e41f4b71Sopenharmony_ci          .margin(10)
282e41f4b71Sopenharmony_ci        TextTimer({isCountDown: false, controller: this.countUpTextTimerController})
283e41f4b71Sopenharmony_ci          .contentModifier(this.myTimerModifier)
284e41f4b71Sopenharmony_ci          .onTimer((utc: number, elapsedTime: number) => {
285e41f4b71Sopenharmony_ci            console.info('textTimer onTimer utc is:' + utc + ', elapsedTime: ' + elapsedTime)
286e41f4b71Sopenharmony_ci          })
287e41f4b71Sopenharmony_ci        Row() {
288e41f4b71Sopenharmony_ci          Button("start").onClick(()=>{
289e41f4b71Sopenharmony_ci            this.countDownTextTimerController.start()
290e41f4b71Sopenharmony_ci            this.countUpTextTimerController.start()
291e41f4b71Sopenharmony_ci          }).margin(10)
292e41f4b71Sopenharmony_ci          Button("pause").onClick(()=>{
293e41f4b71Sopenharmony_ci            this.countDownTextTimerController.pause()
294e41f4b71Sopenharmony_ci            this.countUpTextTimerController.pause()
295e41f4b71Sopenharmony_ci          }).margin(10)
296e41f4b71Sopenharmony_ci          Button("reset").onClick(()=>{
297e41f4b71Sopenharmony_ci            this.countDownTextTimerController.reset()
298e41f4b71Sopenharmony_ci            this.countUpTextTimerController.reset()
299e41f4b71Sopenharmony_ci          }).margin(10)
300e41f4b71Sopenharmony_ci        }.margin(20)
301e41f4b71Sopenharmony_ci      }.width('100%')
302e41f4b71Sopenharmony_ci    }.height('100%')
303e41f4b71Sopenharmony_ci  }
304e41f4b71Sopenharmony_ci}
305e41f4b71Sopenharmony_ci```
306e41f4b71Sopenharmony_ci
307e41f4b71Sopenharmony_ci
308e41f4b71Sopenharmony_ci### Example 4
309e41f4b71Sopenharmony_ciIn this example, the **TextTimer** component is set to execute immediately after it is created.
310e41f4b71Sopenharmony_ci``` ts
311e41f4b71Sopenharmony_ci@Entry
312e41f4b71Sopenharmony_ci@Component
313e41f4b71Sopenharmony_cistruct textTimerStart {
314e41f4b71Sopenharmony_ci  textTimerController: TextTimerController = new TextTimerController()
315e41f4b71Sopenharmony_ci  @State format: string = 'mm:ss.SS'
316e41f4b71Sopenharmony_ci
317e41f4b71Sopenharmony_ci  build() {
318e41f4b71Sopenharmony_ci    Column() {
319e41f4b71Sopenharmony_ci      Scroll()
320e41f4b71Sopenharmony_ci        .height('20%')
321e41f4b71Sopenharmony_ci      TextTimer({ isCountDown: true, count: 30000, controller: this.textTimerController })
322e41f4b71Sopenharmony_ci        .format(this.format)
323e41f4b71Sopenharmony_ci        .fontColor(Color.Black)
324e41f4b71Sopenharmony_ci        .fontSize(50)
325e41f4b71Sopenharmony_ci        .onTimer((utc: number, elapsedTime: number) => {
326e41f4b71Sopenharmony_ci          console.info('textTimer notCountDown utc is: ' + utc + ', elapsedTime: ' + elapsedTime)
327e41f4b71Sopenharmony_ci        })
328e41f4b71Sopenharmony_ci        .onAppear(()=>{
329e41f4b71Sopenharmony_ci          this.textTimerController.start()
330e41f4b71Sopenharmony_ci        })
331e41f4b71Sopenharmony_ci    }
332e41f4b71Sopenharmony_ci  }
333e41f4b71Sopenharmony_ci}
334e41f4b71Sopenharmony_ci```
335e41f4b71Sopenharmony_ci![text_timer_auto_start](figures/text_timer_auto_start.gif)
336