Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Duoclock Laravel Package

sanmai/duoclock

PSR-20 clock abstraction with dual time access (DateTimeImmutable, time(), microtime()) plus mockable sleep/usleep/nanosleep for testing. Includes deterministic TimeSpy and tick helpers to measure elapsed time. Minimal dependency (psr/clock) and easy to mock.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Supports build vs buy decisions for time synchronization features by providing a dedicated, lightweight solution instead of reinventing the wheel for dual-clock scenarios.
  • Enables roadmap items requiring precise client-server time alignment (e.g., real-time collaboration tools, event scheduling systems, audit logs) without complex custom logic.
  • Ideal for use cases involving drift-sensitive operations, such as distributed system coordination, timestamp normalization across environments, and reducing race conditions in time-critical workflows.
  • Adds support for precise elapsed time measurement in performance-critical operations (e.g., benchmarking, latency tracking, process duration monitoring).

When to Consider This Package

  • Adopt when your application requires explicit handling of two distinct time sources (e.g., client vs server, local vs UTC), needs drift correction, must normalize timestamps across environments with minimal overhead, or when needing to track elapsed time between code points for performance metrics or process duration monitoring.
  • Avoid if your use case only involves single-timezone operations (use native PHP/Carbon), requires complex time zone conversions (e.g., daylight saving rules), or if your project already uses a comprehensive time-handling solution. Also skip if the problem is trivial (e.g., simple server-side timestamps), as this package adds unnecessary complexity.

How to Pitch It (Stakeholders)

  • For executives: "This package solves critical time synchronization issues that cause user-facing bugs and support overhead—like inconsistent timestamps in collaborative features—and now also provides precise elapsed time tracking for performance metrics, reducing engineering time spent on debugging time-related edge cases and custom timing solutions, directly improving product reliability and customer trust at a fraction of the cost of building in-house."
  • For engineering: "It offers a clean, testable API for dual-clock scenarios with zero external dependencies beyond Laravel. The small code surface ensures maintainability, and the Apache-2.0 license removes compliance concerns. Integration is straightforward via Laravel service providers, and the focused scope means no bloat—just what you need for precise time normalization and elapsed time tracking without reinventing the wheel."
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport