core/homeassistant/components/logbook
J. Nick Koston f73431ac06
Switch utc_to_timestamp to .timestamp() where possible (#109729)
* Switch utc_to_timestamp to .timestamp()

.timestamp() is faster now in newer cpython

```
from homeassistant.util.dt import utc_to_timestamp, utcnow
import timeit
now = utcnow()
print(timeit.timeit('utc_to_timestamp(now)',globals={"now":now,"utc_to_timestamp":utc_to_timestamp}))
print(timeit.timeit('now.timestamp()',globals={"now":now}))
```

utc_to_timestamp = 0.18721245788037777
timestamp = 0.11421508435159922

* compat

* revert

* revert

* revert

* revert

* revert
2024-02-05 23:04:52 +01:00
..
queries Switch utc_to_timestamp to .timestamp() where possible (#109729) 2024-02-05 23:04:52 +01:00
__init__.py
const.py
helpers.py
manifest.json
models.py
processor.py
rest_api.py
services.yaml
strings.json
websocket_api.py Switch utc_to_timestamp to .timestamp() where possible (#109729) 2024-02-05 23:04:52 +01:00