How can I obtain the data of CPU usage of R Session from windows performance monitor or Resource Monitor between two time points as csv file in Windows

How can I obtain the data of CPU usage of R Session from windows performance monitor or Resource Monitor between two time points as csv file in Windows
