eduardsui / tlse

Single C file TLS 1.2/1.3 implementation, using tomcrypt as crypto library
Other
540 stars 89 forks source link

Discard incorret unused sleep define #47

Closed 00cpxxx closed 5 years ago

00cpxxx commented 5 years ago

Usually it is x / 1000 not * 1000. Anyway the sleep function is not called in the code so it is safe to remove IMO. Please double check.

Alcaro commented 5 years ago

Sleep() takes milliseconds, sleep() takes seconds, so multiplying is correct. Maybe you're thinking of usleep()?

But yes, it is unused.

e: And it is incorrect, though for another reason - sleep(2+2) would end up sleeping for 2+2*1000 = 2002 milliseconds.

00cpxxx commented 5 years ago

Sleep() takes milliseconds, sleep() takes seconds, so multiplying is correct. Maybe you're thinking of usleep()?

But yes, it is unused.

e: And it is incorrect, though for another reason - sleep(2+2) would end up sleeping for 2+2*1000 = 2002 milliseconds.

My bad, you are correct!