Updated template.cpp to include ctime header

Updated Template.cpp to fix some compilation errors.