Code time inaccuracy

Robin2:
The change suggested in Reply #11 is a good idea but it is not going to solve to your problem. That change will just prevent accumulated errors of a few millisecs creeping in.

...R

I want to make one thing clear. Is Arduino Mega capable of doing so many thing at once? Are there any limits? For example if I use all digital pins, all analog pins reading everything at the same time. I know I have many libraries, but I don't have skills to write for e.g. my own or manipulate with PORTs directly.