Skip to content

Repository files navigation

Orisai
Clock

Provider of current time for runtime and controllable time for testing

PSR-20 compatible

📄 Check out our documentation.

💸 If you like Orisai, please make a donation. Thank you!

useOrisai\Clock\Clock;
usefunctionOrisai\Clock\now;
class ExampleService
{
privateClock$clock;
publicfunction__construct(Clock$clock)
{
$this->clock = $clock;
}
publicfunctiondoSomething(): void
{
$currentTime = $this->clock->now();
// Or$currentTime = now();
}
}

About

Provides current time for runtime and controllable time for testing

Topics

Resources

Contributing

Security policy

Stars

5 stars

Watchers

2 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages