Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
YouTube Security VideosRackspace maximizes data center space and compute power with AMD(24.09.2026 um 16:00 Uhr)
Podcasts & Audio BriefingsTechLinked: Android Laptops Are Here…(22.09.2026 um 02:45 Uhr)
Podcasts & Audio BriefingsTechLinked: They’re Really Doing It…(24.09.2026 um 02:56 Uhr)
Podcasts & Audio Briefings9to5Google: Googlebook Hands-On: Android's biggest step in years.(21.09.2026 um 15:00 Uhr)
Podcasts & Audio Briefings9to5Google: 30 days with Pixel 11: What we learned.(22.09.2026 um 17:45 Uhr)
AI & KI NachrichtenNeil Patel: 300 Reviews at 4.2 Beats 15 at 5.0 #shorts(21.09.2026 um 20:03 Uhr)
AI & KI NachrichtenNeil Patel: Google Just Quietly Killed Your Clicks #shorts(22.09.2026 um 20:01 Uhr)
YouTube Security VideosRackspace maximizes data center space and compute power with AMD(24.09.2026 um 16:00 Uhr)
Podcasts & Audio BriefingsTechLinked: Android Laptops Are Here…(22.09.2026 um 02:45 Uhr)
Podcasts & Audio BriefingsTechLinked: They’re Really Doing It…(24.09.2026 um 02:56 Uhr)
Podcasts & Audio Briefings9to5Google: Googlebook Hands-On: Android's biggest step in years.(21.09.2026 um 15:00 Uhr)
Podcasts & Audio Briefings9to5Google: 30 days with Pixel 11: What we learned.(22.09.2026 um 17:45 Uhr)
AI & KI NachrichtenNeil Patel: 300 Reviews at 4.2 Beats 15 at 5.0 #shorts(21.09.2026 um 20:03 Uhr)
AI & KI NachrichtenNeil Patel: Google Just Quietly Killed Your Clicks #shorts(22.09.2026 um 20:01 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

A Detailed Explanation of the Timer in the HarmonyOS Cangjie development Language

Today, it's time for the popular science session that everyone enjoys again. It can also be said to be the pitfall session. Hahaha. Today, let's talk about the timer in Cangjie's language development. This part is really interesting. Why…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

Today, it's time for the popular science session that everyone enjoys again. It can also be said to be the pitfall session. Hahaha. Today, let's talk about the timer in Cangjie's language development. This part is really interesting.



Why do I say so? Because you can hardly find any documentation about Cangjie's timer, nor are there any related code prompts. It can be said that it just keeps writing without a word.



However, it was still found by You LAN Jun with some clues. Today, I'll share it with everyone.



Cangjie's Timer is hidden in the std.sync package and is called Timer. However, when using it, importing only the Timer package is not enough. We need to import these modules:




import std.time.*
import std.sync.Timer
import std.sync.CatchupStyle






The writing method of the timer is also unique. It has several modes. Let's introduce them one by one to you below




Timer.after(Duration.minute, { => 
AppLog.info('这是after计时器');
return Duration.second
})






The meaning of this line of code is that the timer is executed after one minute, and then App.info printing is executed once every minute. This mode is rather strange. Its execution interval is returned in the execution method.



Another rather odd point, I wonder if you have noticed, is that the two time parameters, the delay time and the execution interval, in the timer use enumerations of the Duration type. That is to say, only a few values set by it can be used. Currently, the given time values include Zero, second, minute, hour, etc. It can be seen that they are all time integers. If you want to execute once every two seconds or once every half a second, it is probably not possible.



Image description




Timer.once(Duration.minute,{=> 
AppLog.info('这是once计时器');
})






This mode should be recognizable at a glance by everyone. It is a timer that is executed only once, and the delay time is one minute later.




Timer.repeat(Duration.Zero, Duration.second, {=> 
AppLog.info('这是repeat计时器');
}, style: CatchupStyle.Skip)






"repeat" is a timer for repetitive execution, "last.zero" is the time for delayed execution, and "last.second" is the interval between executions. Here, a new parameter, "style", has emerged. Its name is the leveling strategy. The official explanation given is: When the execution time of a Task is too long, the execution time points of subsequent tasks may be delayed. Different leveling strategies are applicable to different scenarios.




Timer.repeatDuring(period: Duration, delay: Duration, interval: Duration, task: () -> Unit, style: CatchupStyle)  






This timer is similar to the "repeat" above. It has an additional parameter "period", which means the maximum duration of the repetition period. Similarly, there is "repeatTimes", which specifies the maximum number of executions of the task:




Timer.repeatTimes(count: Int64, delay: Duration, interval: Duration, task: () -> Unit, style: CatchupStyle)






The above is the detailed content about the timer in Cangjie's language development. Thank you for reading. Once again, I wish everyone a pleasant holiday. #HarmonyOS Language ## Cangjie ## Shopping #

SOC Incident Playbook: Vulnerability Remediation & Verification
title: Detect Exploitation - A Detailed Explanation of the Timer in the HarmonyOS Cangjie development Language
id: c97be56c-980b-4c04-93e7-ade32f994f2b
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-24
logsource:
  category: network_connection
  product: any
detection:
  selection:
      CommandLine|contains:
        - 'exploit'
  condition: selection
falsepositives:
  - Legitime administrative Zugriffe oder Penetrationstests
level: high
tags:
  - attack.initial_access
rule CTI_Threat_Indicator {
    meta:
        author = "iShareStuff CTI Automated Detection Engine"
        date = "2026-09-24"
        description = "YARA Signature for "
    strings:
        $str = "A Detailed Explanation of the " ascii wide
    condition:
        any of them
}
tsecurity.de Cognitive Threat RAG
Fokus-Vektor:

Kognitive Analyse für identifizierte Bedrohung: Erhöhte Bedrohungslage im Bereich A Detailed Explanation of the Timer in t.... Basierend auf 368k Vektor-Korrelationen werden sofortige Isolationsmaßnahmen für betroffene Endpunkte empfohlen.

🛡️ Angriffsfläche & Exposure

Netzwerk/Remote-Zugriff ohne Vorauthentifizierung möglich.

Empfohlene Sofortmaßnahmen
  • 1. Perimeter-Inspektion: Relevante Portfreigaben und exponierte Endpunkte unverzüglich scannen.
  • 2. Patch-Applikation: Hersteller-Hotfix einspielen oder betroffene Daemons in isolierte DMZ-Segmente überführen.
  • 3. Telemetrie & EDR-Alerts: Prozessaufrufe und Child-Processes auf anomale Shell-Spawns überwachen.
🔗 Semantisch verwandte Zero-Days MariaDB 11.7 VEC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten A Detailed Explanation of the Timer in the HarmonyOS Cangjie development Language

Thematisch verwandte Begriffe: Detailed, Explanation, Timer, HarmonyOS · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-97360 | HFS2 version 2.4.0 and earlier contains an unauthenticated arbitrary fil…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel TTP ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick