0

I have a project in visual C 2010 that needs real-time timing in high priority to eliminate stuff like hard disk maintenance and stuff.

I ran the .exe file of my project using start "" /high & start "" /realtime. (described here: https://superuser.com/questions/31802/starting-visual-studio-as-a-high-priority-process)

However, in the program I log the elapsed time and several other things, and running it this way stops the program updating the log files?

Note, for visual C, I found the .exe file in the debug folder with it's own separate set of log files.

Community
  • 1
  • 1
sam
  • 57
  • 1
  • 10

2 Answers2

0

you can use fflush() right after the logging statement so the data will be written to the disk.

see Flushing buffers in C

Community
  • 1
  • 1
aaa
  • 489
  • 5
  • 13
  • Hi, so I put fflush(stdout); after my print to file statements, however I don't see why I should be doing that? It still doesn't log! :( – sam Oct 28 '13 at 04:48
  • can you put a code snippet in your question? it could be due to other reasons. – aaa Oct 28 '13 at 04:57
  • Hi aaa, it runs and logs perfectly without my trying to set it to run high priority, so I don't know what code to put on. – sam Oct 28 '13 at 05:06
0

problem was, visual studio debug folder was write only. I was manipulating the .exe file in the debug, and that was why... take everything out into a new folder, and it should work!

sam
  • 57
  • 1
  • 10