Skip to content

Commit 674f5a4

Browse files
committed
Tweaks
1 parent 6beddc6 commit 674f5a4

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

components/clock.rst

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,14 @@ Usage
3838
-----
3939

4040
The :class:`Symfony\\Component\\Clock\\Clock` class returns the current time and
41-
allows to use any implementation of the interface described by `PSR-20`_ as a global
42-
clock in your application::
41+
allows to use any `PSR-20`_ compatible implementation as a global clock in your
42+
application::
4343

4444
use Symfony\Component\Clock\Clock;
4545
use Symfony\Component\Clock\MockClock;
4646

47-
// You can set a custom clock implementation, or use the NativeClock default one
47+
// by default, Clock uses the NativeClock implementation, but you can change
48+
// this by setting any other implementation
4849
Clock::set(new MockClock());
4950

5051
// Then, you can get the clock instance
@@ -53,10 +54,10 @@ clock in your application::
5354
// Additionally, you can set a timezone
5455
$clock->withTimeZone('Europe/Paris');
5556

56-
// From here, you are able to get the current time
57+
// From here, you can get the current time
5758
$now = $clock->now();
5859

59-
// And also to sleep for an amount of time
60+
// And sleep for any number of seconds
6061
$clock->sleep(2.5);
6162

6263
The Clock component also provides the ``now()`` function::
@@ -66,11 +67,7 @@ The Clock component also provides the ``now()`` function::
6667
// Get the current time as a DateTimeImmutable instance
6768
$now = now();
6869

69-
.. tip::
70-
71-
If you want to use the Clock component in your services, you may
72-
have a look at the section about
73-
:ref:`using a clock inside your services <clock_use-inside-a-service>`.
70+
Later on this page you can learn how to use this clock in your services and tests.
7471

7572
.. versionadded:: 6.3
7673

@@ -80,7 +77,7 @@ The Clock component also provides the ``now()`` function::
8077
Available Clocks Implementations
8178
--------------------------------
8279

83-
The Clock component provides many ready-to-use implementations of the
80+
The Clock component provides some ready-to-use implementations of the
8481
:class:`Symfony\\Component\\Clock\\ClockInterface`, which you can use
8582
as global clocks in your application depending on your needs.
8683

0 commit comments

Comments
 (0)