Tagged articles
Stopwatch
16 articles · Page 1 of 1
The article explains the drawbacks of manually using System.currentTimeMillis for multi‑stage timing, introduces Spring’s StopWatch utility from spring‑core, demonstrates its API and code examples, shows three common usage scenarios, warns about pitfalls, compares it with raw timers, and argues why Spring itself adopts StopWatch for concise, structured performance monitoring.
AOPJavaSpring
0 likes · 12 min read

This article implements four timer scenarios — countdown, stopwatch, Pomodoro, and alarm — in HarmonyOS ArkUI, explaining design choices like setInterval vs Date.now() for precision, state machines for phase transitions, and lifecycle cleanup to avoid memory leaks.
AlarmArkUICountdown
0 likes · 36 min read

This article explains how to use Spring's org.springframework.util.StopWatch and Apache Commons' org.apache.commons.lang3.time.StopWatch to accurately measure execution time of sequential tasks in Java, covering setup, key methods, practical examples, and important usage considerations.
Apache CommonsCode ProfilingPerformance Timing
0 likes · 9 min read

This article explains several Java techniques for measuring code execution time—including Spring's StopWatch, System.nanoTime, new Date, and System.currentTimeMillis—provides sample code snippets, discusses their usage and output, while also briefly mentions related utilities, and contains promotional links and community invitations.
JavaStopwatchSystem.nanoTime
0 likes · 5 min read

This article explains several common techniques for measuring Java code execution time, including System.currentTimeMillis(), Spring's StopWatch utility, System.nanoTime(), and the use of new Date(), providing code examples and a brief overview of StopWatch's API for developers seeking precise performance metrics.
BackendJavaStopwatch
0 likes · 5 min read

This article explains why simple System.currentTimeMillis() timing is often insufficient, introduces Spring's org.springframework.util.StopWatch and Apache Commons' org.apache.commons.lang3.time.StopWatch, provides Maven dependencies and complete Java examples, and discusses important usage notes such as thread‑safety and task management.
Apache CommonsSpringStopwatch
0 likes · 11 min read

This article explains why manual timestamp logging is cumbersome, introduces Spring's org.springframework.util.StopWatch and Apache Commons Lang's StopWatch, provides Maven dependencies, detailed usage examples, key methods, and important cautions for accurate performance measurement in Java applications.
Apache CommonsCode TimingJava
0 likes · 11 min read

This article explains how to use Spring's org.springframework.util.StopWatch and Apache Commons Lang3 StopWatch to accurately measure and analyze Java code execution time, covering setup, basic usage, advanced features, thread‑safety considerations, and practical code examples for both libraries.
Apache CommonsCode ProfilingJava
0 likes · 8 min read

This article explains how to leverage Spring's org.springframework.util.StopWatch and Apache Commons Lang3 StopWatch for precise Java performance measurement, covering setup, usage examples, source code insights, important considerations, and practical code snippets for both libraries.
Apache CommonsCode ProfilingPerformance Monitoring
0 likes · 9 min read

This guide compares simple Date‑based timing, System.currentTimeMillis(), and Spring's StopWatch utility, showing how to accurately measure and analyze execution durations of individual code blocks in Java applications.
BackendJavaSpring
0 likes · 8 min read

This article introduces four practical approaches for measuring code execution time in Java—including simple time‑difference calculation, StopWatch‑style utilities, functional interfaces with Supplier/IntConsumer, and AutoCloseable‑based tracing—providing code examples, usage patterns, and enhancements such as chainable start methods.
AutoCloseableJavaStopwatch
0 likes · 10 min read

This article explains how to use Spring's built‑in StopWatch utility to record the start and end times of multiple code sections, generate a clear performance summary, and compares it with similar tools from Apache Commons and Guava.
BackendJavaSpring
0 likes · 5 min read

An in‑depth guide explains Guava’s Stopwatch utility, showing how to create, start, stop, and reset timers, customize the time source via Ticker, compare it with raw System.nanoTime or System.currentTimeMillis, and highlights its advantages for accurate performance measurement in Java and Android projects.
GuavaJavaStopwatch
0 likes · 5 min read

The article details how adding risk‑control measures slowed a new‑user group order API, how profiling identified the costly "determine new user" step, and how replacing a database query with a Redis BitMap reduced response time by 31% while exposing a production‑scale BitMap offset limitation.
BitmapJavaStopwatch
0 likes · 10 min read

This article introduces six practical methods for measuring Java code execution time, covering built‑in System.currentTimeMillis, System.nanoTime, new Date, Spring’s StopWatch, Apache Commons‑lang3 StopWatch, and Guava’s Stopwatch, and explains their underlying principles and usage examples.
JavaStopwatchSystem.nanoTime
0 likes · 11 min read

This article introduces a lightweight Groovy TimeWatch utility that lets developers record execution times with customizable markers, offering both millisecond and nanosecond precision, and explains its implementation, usage, and future multithreading considerations.
Code ExampleGroovyJava
0 likes · 6 min read
