Skip to content

Commit 51f5721

Browse files
authored
docs: Update README.md, pip install directly!
1 parent 09a945f commit 51f5721

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
dztimer
22
---
33
<!-- <a href="https://github.com/KTH-RPL/dztimer"><img src="https://img.shields.io/github/v/release/KTH-RPL/dztimer?label=version" /> <a href="https://github.com/KTH-RPL/dztimer/blob/master/LICENSE"><img src="https://img.shields.io/github/license/KTH-RPL/dztimer" /> -->
4-
<img src="https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black" /> <img src="https://img.shields.io/badge/Windows-0078D6?st&logo=windows&logoColor=white" /> <img src="https://img.shields.io/badge/mac%20os-000000?&logo=apple&logoColor=white" />
4+
<a href="https://github.com/KTH-RPL/dztimer"><img src="https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black" /> <a href="https://github.com/KTH-RPL/dztimer"><img src="https://img.shields.io/badge/Windows-0078D6?st&logo=windows&logoColor=white" /> <a href="https://github.com/KTH-RPL/dztimer"><img src="https://img.shields.io/badge/mac%20os-000000?&logo=apple&logoColor=white" />
55
<!-- <img src="https://img.shields.io/pypi/pyversions/dztimer.svg" /></a> -->
66

77
A beautiful timer from ufomap by [Daniel Duberg](https://www.kth.se/profile/dduberg), nanobind by [Qingwen Zhang](https://kin-zhang.github.io/).
88

99
Running on macOS, Windows and Linux, with Python Version >= 3.8.
1010

11-
TestDemo:
11+
Install:
1212
```bash
13-
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ dztimer
13+
pip install dztimer
1414
python3 -c 'import dztimer'
1515
```
1616

@@ -29,6 +29,7 @@ timer[0].stop()
2929
for i in range(5):
3030
timer[1].start("Second Scan Cost")
3131
sleep(0.08 + i * 0.01)
32+
print("latest one cost:",timer[1].lastSeconds())
3233
timer[1].stop()
3334
timer.print(random_colors=True, bold=True)
3435
```
@@ -50,4 +51,4 @@ python3 -c 'import dztimer'
5051
### Issue I met when write this package
5152
1. multiple platform support, especially for windows, there is an error: error C2668: 'fpclassify': ambiguous call to overloaded function,[https://stackoverflow.com/questions/61646166/how-to-resolve-fpclassify-ambiguous-call-to-overloaded-function](https://stackoverflow.com/questions/61646166/how-to-resolve-fpclassify-ambiguous-call-to-overloaded-function). It's turn out if you want to `std::isnan()` in windows, you need to include `<cmath>` and `std::isnan(static_cast<double> (you_value))`.
5253
2. If you use `std::array` except linux, you need to include `#include <array>` and `std::array<int, 2> my_array;` instead of `std::array my_array;`
53-
3.
54+
3.

0 commit comments

Comments
 (0)