It's pretty quiet just now so I thought about dealing with this, perhaps once and for all. There are guides at the beginning of the forum, specifically:
Using millis() for timing. A beginners guide
Useful links - check here for reference posts / tutorials
How to use this forum - please read.
Read this before posting a programming question ...
Read these, please, especially the last two.
I draw your attention to the ongoing plea to post your code in tags. There's a reason for this. Like many, I use a variety of tools in coding. One of these is Notepad++. It's a useful editor with very good colour highlighting that reveals many syntax errors immediately.
When code is formatted and posted properly (within tags) it is a very simple matter to select/copy/paste into a new tab in NPP (Notepad++). Selecting the language as C or C++ will highlight all the code in a keyword colour scheme of your choice. This makes life easier for somebody likely to offer you a suggestion as to what your software issue might be, rather than download, drag a mouse to select, reformatting, and on and on.
Furthermore, the user community for NPP is quite extensive as well and several plug-ins have been developed that make life easier still. If you choose to use NPP, make sure you get the plug-ins NPPExec and TextFX. The former allows for attaching command line batch-type structures to shortcut key sequences, thereby allowing you to invoke the avr-gcc compiler (or any other compiler for that matter) and the latter contains many text formatting functions, specifically Reindent C++ code.
Back to NPPExec, without having an Arduino even attached to your system you can compile your code quickly and see where errors and warnings pop up. As you have more direct control over the compiler switches, you can experiment more easily as well. Additionally, include objcopy in your batch file and you can produce a hex file that can be uploaded directly with avrdude or 3rd party apps such as Xloader. Switch compilers too! The latest release of Arduino IDE 1.8.5 ships with gcc 4.9.2 where the latest gcc release is 7.2.0. Using the latest compiler, I see code as much as 10% lighter.
All that aside, the point is that with an environment set up to quickly and easily load and check code, if that code adheres to the guidelines, is it any wonder really, why some get frustrated with what seems to be an ongoing ambivalence towards those requests? Remember, we're not reading your post for our benefit.
=========================================
Post script.
For those interested in the NPP platform as an editor. Install at least the NPPExec plug-in. From the Plugins>NPPExec>Execute... (or press F6) you'll get a window for your script. What I use is:
NPP_SAVE
cd $(CURRENT_DIRECTORY)
d:\Arduino\AVR Programming\avr-gcc-7.2.0-x86-mingw\bin\avr-gcc.exe -Wall -mmcu=atmega328p -DF_CPU=16000000UL -std=c99 -Os -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects $(FILE_NAME) -o $(NAME_PART).o
d:\Arduino\AVR Programming\avr-gcc-7.2.0-x86-mingw\bin\avr-objcopy -O ihex $(NAME_PART).o $(NAME_PART).hex
d:\Arduino\AVR Programming\avr-gcc-7.2.0-x86-mingw\bin\avr-size $(NAME_PART).hex
which will save the file, compile it, produce the hex file and then run avr-size so you can see how big it is.
Obviously the directory will need to be changed to point to your own compiler location and make sure that -mmcu is defining the proper processor. The other thing you must be aware of is that gcc ships with both the C and C++ compilers (gcc and g++). The file from within NPP must have a .c or .cpp extension (no .ino).
dkw