added the code to set the timestamp when adding a data point
added demo examples for maxSize and maxTime usage