diff --git a/src/Traits/InteractsWithTime.php b/src/Traits/InteractsWithTime.php index 6ba876f..b2a3033 100644 --- a/src/Traits/InteractsWithTime.php +++ b/src/Traits/InteractsWithTime.php @@ -65,7 +65,23 @@ protected function parseDateInterval($delay) * Get the current system time as a UNIX timestamp. */ protected function currentTime(): int + { + return $this->currentTimestamp(); + } + + /** + * Get the current system time as a UNIX timestamp. + */ + protected function currentTimestamp(): int { return Carbon::now()->getTimestamp(); } + + /** + * Get the current system time as a UNIX timestamp with milliseconds. + */ + protected function currentTimestampMs(): float + { + return Carbon::now()->getPreciseTimestamp(3); + } }