Just a few lines of code using millis(), works with micros() also.
Using PPS pin from Adafruit Ultimate GPS connected to pin 3.
Always prints 0, well for hours anyway.
Once you find your value instead of 122, you only need GPS signal in setup.
PPS continues to work for awhile, but you don't need that either.
The Arduino clock stays correct to 1ms for hours.
Or no GPS at all if you only care about relative time.
void setup(){
delay(20,000);
while(digitalRead(3)==0); long ms=millis();
}
void loop(){
while(digitalRead(3)==0); long m=millis();
long n=(m/1000-20)*122/1000;
Serial.println((m+n-ms)%1000);
}