Tag

Timer

0 views collected around this technical thread.

Deepin Linux
Deepin Linux
Jan 27, 2025 · Backend Development

High-Concurrency C++ Timer Implementations: Red-Black Tree, Min-Heap, and Time Wheel

This article examines high‑concurrency C++ timer solutions, detailing the principles, advantages, and code examples of three implementations—red‑black tree, min‑heap, and time‑wheel—while comparing their performance, complexity, and suitable application scenarios for server‑side systems.

C++Data StructuresTimer
0 likes · 22 min read
High-Concurrency C++ Timer Implementations: Red-Black Tree, Min-Heap, and Time Wheel
Deepin Linux
Deepin Linux
Jan 13, 2025 · Backend Development

C++ Timers in Asynchronous Programming: Implementation, Optimization Techniques, and Real‑World Case Study

This article explains why C++ timers are essential for asynchronous programming, presents three implementation approaches—including a simple thread‑chrono version, a Boost.Asio based timer, and a C++11 atomic/condition‑variable design—offers practical optimization tips such as precise intervals, thread‑pool reuse, efficient callbacks, and memory management, and demonstrates their impact with a network‑server case study comparing naïve and optimized solutions.

Asynchronous ProgrammingBoost.AsioC++
0 likes · 22 min read
C++ Timers in Asynchronous Programming: Implementation, Optimization Techniques, and Real‑World Case Study
IT Services Circle
IT Services Circle
Jan 7, 2025 · Backend Development

Replacing Thread.sleep Loops with Proper Scheduling in Java

The article explains why using Thread.sleep in a loop causes busy‑waiting and performance problems, and demonstrates several Java scheduling alternatives—including Timer/TimerTask, ScheduledExecutorService, wait/notify, and CompletableFuture—to efficiently check a flag at fixed intervals.

CompletableFutureJavaScheduledExecutorService
0 likes · 9 min read
Replacing Thread.sleep Loops with Proper Scheduling in Java
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Dec 12, 2024 · Frontend Development

Understanding JavaScript setTimeout and setInterval and Implementing setInterval Using setTimeout

This article explains the fundamentals and execution order of JavaScript's setTimeout and setInterval functions, discusses their parameters and return values, demonstrates why setTimeout is asynchronous, shows how to cancel timers, and provides a custom recursive setTimeout solution that mimics setInterval behavior.

JavaScriptTimerfrontend
0 likes · 12 min read
Understanding JavaScript setTimeout and setInterval and Implementing setInterval Using setTimeout
Python Programming Learning Circle
Python Programming Learning Circle
Sep 11, 2024 · Fundamentals

Using Python's functools Module to Build Advanced Decorators

This article explains the fundamentals of Python decorators, demonstrates how to leverage the standard library functools module—including wraps, partial, and lru_cache—to build advanced, flexible decorators, and provides concrete timer and partial-function examples with full source code.

PythonTimerdecorators
0 likes · 6 min read
Using Python's functools Module to Build Advanced Decorators
Java Architect Essentials
Java Architect Essentials
Jul 30, 2024 · Backend Development

Transparent Token Refresh: Client‑Side and Server‑Side Implementations

This article explains how to implement seamless, invisible token refresh for authentication systems, covering client‑side strategies using Axios interceptors and timers, server‑side gateway filters with Spring Boot, code examples for detecting token expiration, obtaining new tokens, and choosing between client and server approaches based on security and performance considerations.

AuthenticationAxiosJWT
0 likes · 23 min read
Transparent Token Refresh: Client‑Side and Server‑Side Implementations
FunTester
FunTester
Jul 25, 2024 · Backend Development

Overview of Scheduled Tasks and Their Implementations in Java and Go

This article introduces the concept of scheduled tasks, outlines common use cases such as data backup, log cleanup, and performance monitoring, and provides detailed examples of implementing periodic jobs in Java using java.util.Timer, ScheduledExecutorService, Spring @Scheduled, and Quartz, as well as in Go using the time package, cron library, and gocron.

GoJavaTimer
0 likes · 12 min read
Overview of Scheduled Tasks and Their Implementations in Java and Go
Sohu Tech Products
Sohu Tech Products
Jun 14, 2023 · Mobile Development

Understanding CADisplayLink, NSTimer, and RunLoop in iOS: Implementation, Issues, and Solutions

This article explains the principles, usage, and internal mechanisms of CADisplayLink and NSTimer in iOS, compares their advantages and drawbacks, discusses common pitfalls such as retain cycles, explores RunLoop modes and sources, and provides code examples and solutions for reliable timer handling.

CADisplayLinkMobile DevelopmentNSTimer
0 likes · 24 min read
Understanding CADisplayLink, NSTimer, and RunLoop in iOS: Implementation, Issues, and Solutions
Laravel Tech Community
Laravel Tech Community
Mar 14, 2023 · Backend Development

Implementing High‑Precision Timers in PHP with Workerman and Swoole

This article explains why traditional crontab cannot meet second‑ or millisecond‑level scheduling requirements in PHP projects and demonstrates how to use Workerman and Swoole timers, including code examples for one‑time, recurring, and task‑based executions.

PHPSwooleTimer
0 likes · 6 min read
Implementing High‑Precision Timers in PHP with Workerman and Swoole
Tencent Cloud Developer
Tencent Cloud Developer
Aug 9, 2022 · Backend Development

Deep Dive into Asio Scheduler, Strand, and Timer Implementation

The article thoroughly examines Asio’s core mechanisms—its scheduler’s post handling, the strand’s lock‑based ordering, and the timer subsystem’s heap‑driven queues—detailing executor operations, multi‑threaded execution paths, platform‑specific timer schedulers, and the efficient C++ techniques that enable high‑performance asynchronous programming.

C++NetworkingStrand
0 likes · 38 min read
Deep Dive into Asio Scheduler, Strand, and Timer Implementation
IT Architects Alliance
IT Architects Alliance
Apr 5, 2022 · Backend Development

Understanding Java Timers, DelayQueue, ScheduledThreadPoolExecutor, and Time‑Wheel Algorithms

This article explains the concepts, use cases, and internal implementations of Java's Timer, DelayQueue, and ScheduledThreadPoolExecutor, compares their performance characteristics, and introduces the time‑wheel scheduling algorithm—including hierarchical wheels—to address scalability challenges in high‑volume timed‑task systems.

DelayQueueJavaScheduledThreadPoolExecutor
0 likes · 12 min read
Understanding Java Timers, DelayQueue, ScheduledThreadPoolExecutor, and Time‑Wheel Algorithms
IT Services Circle
IT Services Circle
Mar 23, 2022 · Operations

Understanding High‑Precision Timer Scheduling in Java and Linux Kernels

The article explores why absolute‑precision periodic tasks are hard to achieve, compares Java Timer and ScheduledExecutorService with Linux kernel mechanisms such as DelayedWorkQueue, futex, pthread_cond_timedwait, and high‑resolution hrtimers, and explains the underlying data structures and timing‑wheel algorithms.

JavaTimerhigh-precision
0 likes · 11 min read
Understanding High‑Precision Timer Scheduling in Java and Linux Kernels
Kuaishou Tech
Kuaishou Tech
Sep 10, 2021 · Mobile Development

Analyzing and Resolving a Main Thread ↔ JavaScriptCore Heap Collector Thread Deadlock on iOS 13

This article investigates a deadlock between the Main Thread and the JavaScriptCore Heap Collector Thread on iOS 13, explains the underlying mutex and RunLoop interactions, reproduces the issue with CFTimer‑based timers, and proposes an AutoReleasePool‑wrapped solution along with best‑practice recommendations for JavaScriptCore usage.

DeadlockJavaScriptCoreRunLoop
0 likes · 17 min read
Analyzing and Resolving a Main Thread ↔ JavaScriptCore Heap Collector Thread Deadlock on iOS 13
Kuaishou Frontend Engineering
Kuaishou Frontend Engineering
Sep 10, 2021 · Mobile Development

Main Thread vs JavaScriptCore: iOS 13 Deadlock Explained & Fixed

An in‑depth analysis reveals how a Main Thread and JavaScriptCore Heap Collector Thread can deadlock on iOS 13 due to RunLoop lock contention triggered by timer callbacks and AutoReleasePool memory reclamation, and provides a practical solution using scoped AutoReleasePool blocks to prevent the issue.

DeadlockJavaScriptCoreMobile
0 likes · 18 min read
Main Thread vs JavaScriptCore: iOS 13 Deadlock Explained & Fixed
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jul 16, 2021 · Backend Development

Mastering Java Scheduled Tasks: Timer vs ScheduledExecutorService

This article compares Java's Timer and ScheduledExecutorService for scheduling tasks, explains their internal workings, demonstrates common pitfalls, and provides multiple code examples showing how to schedule one‑off, fixed‑rate, and fixed‑delay tasks using both Runnable and Callable.

JavaScheduledExecutorServiceTimer
0 likes · 8 min read
Mastering Java Scheduled Tasks: Timer vs ScheduledExecutorService
Java Architect Essentials
Java Architect Essentials
May 19, 2021 · Backend Development

StopCoding IntelliJ IDEA Plugin: Installation, Usage, and Development Guide

StopCoding is an IntelliJ IDEA plugin designed to prevent coding fatigue by periodically displaying an unclosable reminder dialog with a countdown, and this guide explains how to install, configure, and develop the plugin using Java, Swing UI components, and the JDK Timer API.

IDEAIntelliJJava
0 likes · 8 min read
StopCoding IntelliJ IDEA Plugin: Installation, Usage, and Development Guide
JD Tech
JD Tech
Apr 16, 2021 · Backend Development

Using java.util.Timer for Scheduled and Delayed Tasks in Java

This article explains how to use java.util.Timer for one‑time and periodic task scheduling, covering constructors, instance methods, daemon‑thread behavior, handling past dates, negative delays, multiple tasks, and proper shutdown, with complete code examples and execution results.

JavaTimerbackend
0 likes · 24 min read
Using java.util.Timer for Scheduled and Delayed Tasks in Java
Java Architect Essentials
Java Architect Essentials
Mar 9, 2021 · Backend Development

StopCoding: Building an IntelliJ IDEA Plugin to Prevent Coding Addiction

StopCoding is an IntelliJ IDEA plugin designed to curb prolonged coding sessions by periodically displaying an unclosable reminder dialog with a countdown, and the article provides installation instructions, usage guide, and a detailed development tutorial covering plugin structure, Swing UI, timer implementation, and key Java code snippets.

IntelliJ IDEAJavaSwing
0 likes · 7 min read
StopCoding: Building an IntelliJ IDEA Plugin to Prevent Coding Addiction
Architect's Tech Stack
Architect's Tech Stack
Jan 14, 2021 · Backend Development

StopCoding: An IntelliJ IDEA Plugin to Prevent Coding Fatigue – Installation, Usage, and Development Guide

This article introduces StopCoding, an IntelliJ IDEA plugin designed to interrupt prolonged coding sessions by showing an unclosable reminder dialog, and provides step‑by‑step installation, usage instructions, and a detailed Java‑based development tutorial including Swing UI and Timer implementation.

Coding HealthIDEA pluginIntelliJ
0 likes · 7 min read
StopCoding: An IntelliJ IDEA Plugin to Prevent Coding Fatigue – Installation, Usage, and Development Guide