Use GetTickCounter to calculate execution time
Refactor freeSpace()
Refactor timer()