[Test] Fix MacOS `test_actors_and_tasks_with_gpus`.  (#29598)
[Test] Fix MacOS `test_actors_and_tasks_with_gpus`.  (#29598)

Signed-off-by: SangBin Cho <3e32b4f148a48bc31c6efe031a780e14f943d411@gmail.com>

The test verifies that the same GPU is not used by more than 1 task with num_gpus=1 or 2 at a time. It compares the interval that the task is occupying GPU and make sure there's no overlap.

At this time, the test uses time.monotonic to compare "cross-process" interval. This seems to be a bad approach because as you can read from the time.monotonic documentation, the returned value is undefined, but only the interval between two results are valid. I used time.time instead and verified it fixes the issue.

https://docs.python.org/3/library/time.html#time.monotonic

The reference point of the returned value is undefined, so that only the difference between the results of two calls is valid.
Not sure how it passed before. Maybe some systems guarantee the return value if valid across processes, and some are not. And for some reasons, the new Mac tests start using the system that has undefined behavior
ray-project/ray,ray-project/ray,ray-project/ray,ray-project/ray,ray-project/ray,ray-project/ray,ray-project/ray,ray-project/ray