Fix compile issues on windows
Add new API to pull user specified time intervals in a batch