---
title: "#periodictimer articles | Hashnode"
description: "Explore 1 articles tagged #periodictimer on Hashnode. Tutorials, guides, and how-tos from the community."
url: "https://hashnode.com/tag/periodictimer"
---

Tag

# #periodictimer

1 posts · 0 followers

[shiney](https://hashnode.com/@eddychu) · [Jan 16, 2024](https://hashnode.com/posts/periodictimerthe-new-async-timer-from-net-6/65a62368d072a12008cd80c0)

### [PeriodicTimer(the new async timer from .NET 6)](https://docs.inorah.xyz/periodictimerthe-new-async-timer-from-net-6?utm_source=hashnode&utm_medium=feed)

在.NET 6 中引入了新 Timer：System.Threading.PeriodicTimer，它和之前的 Timer 相比，最大的区别就是新的 PeriodicTimer 事件处理可以方便地使用异步，消除使用 callback 机制减少使用复杂度。讲解 PeriodicTimer 之前我们先来看以下该怎么使用它： using var cts = new CancellationTokenSource(); Console.CancelKeyPress += (sender, e) => ...

2 min read · [docs.inorah.xyz](https://docs.inorah.xyz/periodictimerthe-new-async-timer-from-net-6?utm_source=hashnode&utm_medium=feed)
