you could have something like a time-variable that in increases while the key is pressed.
then you check this variable against certain values and perform actions when you want to...
some thing like this: (pseudo-code)
// setup the variable
int time = 0;
// main loop
while ( LoopGDK() )
{
...
if ( dbKeyState(29) )
time++; // increase while pressed
else
time = 0; // reset to zero if not pressed
// here you react to the variables value as you wish
if ( time > 100 && time <= 200 )
{
// perform actions 1
}
if ( time > 200 )
{
// perform actions 2
}
...
dbSync();
}
To improve this you would increase the 'time' variable by a certain time-constant to make it perform at the same speed on any system...
Hope this helps understand timed actions!
They say it's better to burn out, than it is to fade away...