Implements total and used memory and cpu usage statistics. Adds timestamp to the statistics.