Timothy Pawlett, 52, from Haverfordwest and Gareth Clement, 55, from Crymych, are alleged to have left Fishguard port early or arrived late while still claiming full working hours.
It meant they had been overpaid a combined total of over £1,800.
They both deny a single charge of fraud and the trial at Swansea Crown Court continues.
Prosecuting, Nicholas Gedge told the court Mr Pawlett was secretly logged leaving his post early or arriving late 72 times between 1 November 2015 and 17 February 2016.
Mr Clement was said to have left early on 54 occasions.
In some instances they had left two hours early.
It meant Mr Pawlett had been overpaid £1,100 and Mr Clement £710.
The alarm was raised when their boss, Det Sgt Ian Hardy could not find either of the officers before their shifts had ended.
"He was a little curious," said Mr Gedge, especially when he found both had recorded completing their full shifts.
The following night he parked outside Fishguard harbour and saw Mr Clement driving away 40 minutes early.
He drove to Mr Pawlett's home and saw his car already parked outside, which meant he must have left 30 minutes early.
Det Sgt Hardy asked for a camera with automatic vehicle number plate recognition technology to be checked and discovered "numerous" examples of them leaving early.
After their arrests neither officer disputed the data.
Mr Clement said he had been having personal and family difficulties while Mr Pawlett said he had been suffering from anxiety and depression.

But their decision to take up rowing - and winning Olympic gold at their first attempt - has sealed their place in British sporting history.
Glover, 26, and Stanning, 27, took victory in the women's pair at Eton Dorney on Wednesday to win the first gold medal for Britain at London 2012.
More remarkably, they become the first British female rowers to achieve the feat since the sport was added to the Olympics in 1976.
Born in Truro, Glover was a cross-country runner and hockey player, competing internationally, before burying her head in books and gaining a teaching qualification.
It wasn't until she heard about Sporting Giants, a scheme to find the Olympians of the future, in 2008 that she stepped into a boat and picked up an oar for the first time. From there, she was chosen for the Great Britain's rowing talent programme, two years after Stanning joined the same initiative, and two years later the dream team was formed.
Stanning, who was born in Yeovil, took a different route, taking up rowing at 19 after her friends suggested she try it because she was tall. Two years later she was on the rowing talent programme but switched her focus to the army, where she was commissioned in 2008.
Four years ago, she decided to focus on rowing, taking a break from the Royal Artillery, and heading back to the water. There she teamed up with Glover and started on the road to London.
The pair narrowly missed out on gold to New Zealand at last year's World Championships, but that defeat was their last as they upped the stroke rate in 2012 to remain unbeaten in all three World Cups.
They were barely mentioned in the build-up to London as three-time Olympic silver medallist Katherine Grainger and her chase for that elusive gold dominated the headlines along with the men's four - Britain's flagship boat - which has won gold in the last three Olympics.
But an Olympic record in the first race of the regatta sparked interest - and their performance in the final in front of a partisan home crowd - was the perfect way to end what could be their last race together.
Before the regatta, Stanning said she would return to the army, with a posting in Afghanistan a possibility. Regardless of whether she sticks to her decision or decides to add to her medal collection, their achievement will forever be engraved on London 2012 - because everyone remembers the first.
Two Pembrokeshire police officers left work early 126 times in three months, a jury has heard.
[NEXT_CONCEPT]
Four years ago, Helen Glover was an aspiring hockey player and Heather Stanning was embarking on a career in the army.