We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Hyperf\Support\Traits\InteractsWithTime
1 parent 6a9d19f commit 2929accCopy full SHA for 2929acc
src/Traits/InteractsWithTime.php
@@ -65,7 +65,23 @@ protected function parseDateInterval($delay)
65
* Get the current system time as a UNIX timestamp.
66
*/
67
protected function currentTime(): int
68
+ {
69
+ return $this->currentTimestamp();
70
+ }
71
+
72
+ /**
73
+ * Get the current system time as a UNIX timestamp.
74
+ */
75
+ protected function currentTimestamp(): int
76
{
77
return Carbon::now()->getTimestamp();
78
}
79
80
81
+ * Get the current system time as a UNIX timestamp with milliseconds.
82
83
+ protected function currentTimestampMs(): float
84
85
+ return Carbon::now()->getPreciseTimestamp(3);
86
87
0 commit comments