Code sample to see if now is 20 minutes since the last time widget run?

Hi,

when my widget runs I want to compare the date/time to see if it's 20 minutes later since the last time it ran. Does any one have any sample code, i.e. how to convert the current date/time to an object I can use to compare against the last time.

Ta