torch/monitor: make tests more robust on windows (#71581)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/71581
Fixes https://github.com/pytorch/pytorch/issues/71553
Test Plan:
add ciflow/windows to CI
buck test //caffe2/test:monitor -- --stress-runs 100 test_interval_sec
I don't have a windows machine so need to rely on CI to test
Reviewed By: edward-io
Differential Revision: D33691540
fbshipit-source-id: 69f28f1dfa7243e4eeda642f9bef6d5d168381d2
(cherry picked from commit 5d24dc7c2f5e8e0f48fdd602b1eaa3a8e6929715)