Interpreting the question to be asking about a Raspberry Pi running Raspbian.
The OS is the dominant influence in how the Rapberry Pi keeps time.
Answer: Without an external source, the internal clock is highly unpredictable in terms of keeping time on its own.
Recent case studies:
This is a plot from a Raspberry Pi 3 B datalogger which suddenly lost utility power for about an hour:

You can clearly see that when power came back on, it booted and restarted the data logging.
But the Raspbian clock jumps back in time.
Then you can see it jump forward to the correct time as soon as it gets an update from time.nist.gov
The National Bureau of Standards recommends using time.nist.gov because it is a smart URL that finds the quickest and most accurate time available. Both Linux (ubuntu and Raspbian) and Windows default to pools which can be many hops away from the Master Clock.
How do I set Raspbian to use the primary time server time.nist.gov?
Here is a newer plot from the same system again.
Since it interrupted yesterday (see plot above) I used sudo init 0
to shut it down properly, in order to image the SD card with Win32DiskImager on a PC.
It takes a while, as can be seen here.

In this one you can see Raspbian initially restarted its clock right where it left off. It looks like it had logged good data (jumps up) within a minute.
Then it shows what happens when it receives the time update. It jumps forward to the right.
The amount it jumps forward (a couple of hours) is time that was missed by Raspbian while the SD card was being imaged.
Here's a surprising twist.
The system simply froze up. Both red and green lights on, no flickering.
Announced (using espeak
) within minutes by the main server's ping-based cron job which monitors the data loggers for just such an occurrence. So it wasn't off more than a few minutes.
Pulled power for a few seconds. Rebooted it - LEDs look normal.
Here is how this glitch affected the data logging:

The Raspbian clock jumped forward by 2 hours when the system was rebooted.
Then the time update from time.nist.gov sets it back.
Answer: Without an external source, the internal clock is unpredictable in terms of keeping Real Time on its own.
How do I set Raspbian to use the primary time server time.nist.gov?