It is possible, but you should understand that a raspberry pi comes without a battery, so it won't be able to retain or save your current time. Hence, you'll always need to sync your raspberry pi to the internet for updating the date or the time.
Now, if your app is running headless on the raspbian, you will need to be connected to a visual unit, any kind of a monitor or display device, and have set data point to it. Now, on your headed app, configure a web page to display the clock and try setting up a timer that you can use to update the changes in time.
So, with that done, create and register a background task" on MSDN.
As for the timer declaration, this should be fine:
ThreadPoolTimer _clockTimer = null;
Now, for the timer initialization, this should do the trick:
_clockTimer = ThreadPoolTimer.CreatePeriodicTimer(_clockTimer_Tick, TimeSpan.FromMilliseconds(1000));
And finally, make sure to specify this to ensure that your timer is ticking regularly:
private void _clockTimer_Tick(ThreadPoolTimer timer)
{
//Update your display. You can also use dispatcher if required
}
And if you need anything else on the same, you can refer to the ThreadPoolTimer documentation that I'm specifying below:
https://msdn.microsoft.com/en-us/library/windows/apps/xaml/windows.system.threading.threadpooltimer.aspx
Explore and see if you need something else time-related! :)