llm-ls icon indicating copy to clipboard operation
llm-ls copied to clipboard

In Windows, it will cause bug sometimes.

Open mikeshi80 opened this issue 1 year ago • 2 comments

https://github.com/huggingface/llm-ls/blob/f58085b8127dc09ae09645e04019a668a85e4976/crates/llm-ls/src/main.rs#L795

Instant::now() maybe return a value smaller than MAX_WARNING_REPEAT (3600s) in my Win11, and it will cause the checked_sub return None, that make program show error message "instant to be in bounds" and exit exceptionally.

I think it could be the reason: https://doc.rust-lang.org/std/time/struct.Instant.html#underlying-system-calls

Windows use QueryPerformanceCounter as underlying system call.

My OS is Win11 Home Edition, 23H2 version.

mikeshi80 avatar Nov 09 '23 05:11 mikeshi80