I want to create a series of files under \"log\" directory which every file named based on execution time. And in each of these files, I want to store some log info for my p
Sounds like you have mostly solved it already - to create a file like you describe:
char filename[256] = "log/"; timeStamp( filename ); f = fopen( filename, "a" );
Or do you wish do do something more?