@@ -50,10 +50,11 @@ class Test { | |||||
kk.setDisplayTitle("libcaca .NET Bindings test suite"); | kk.setDisplayTitle("libcaca .NET Bindings test suite"); | ||||
Event e = new Event(); | Event e = new Event(); | ||||
int startTime = kk.getRendertime(); | |||||
while(kk.getEvent(Event.type.KEY_RELEASE, e, 10) == 0) | while(kk.getEvent(Event.type.KEY_RELEASE, e, 10) == 0) | ||||
{ | { | ||||
kk.Refresh(); | kk.Refresh(); | ||||
Console.WriteLine("Render time : {0}", kk.getRendertime()); | |||||
Console.WriteLine("Render time : {0}", kk.getRendertime()-startTime); | |||||
} | } | ||||
@@ -57,7 +57,7 @@ static int _lowlevel_event(caca_display_t *, caca_event_t *); | |||||
* | * | ||||
* \param dp The libcaca graphical context. | * \param dp The libcaca graphical context. | ||||
* \param event_mask Bitmask of requested events. | * \param event_mask Bitmask of requested events. | ||||
* \param timeout A timeout value in microseconds | |||||
* \param timeout A timeout value in microseconds, -1 for blocking behaviour | |||||
* \param ev A pointer to a caca_event structure, or NULL. | * \param ev A pointer to a caca_event structure, or NULL. | ||||
* \return 1 if a matching event was received, or 0 if the wait timeouted. | * \return 1 if a matching event was received, or 0 if the wait timeouted. | ||||
*/ | */ | ||||
@@ -21,7 +21,7 @@ int main(void) | |||||
/* Draw a string at coordinates (0, 0) */ | /* Draw a string at coordinates (0, 0) */ | ||||
cucul_putstr(cv, 0, 0, "This is a message"); | cucul_putstr(cv, 0, 0, "This is a message"); | ||||
/* Refresh display */ | /* Refresh display */ | ||||
caca_refresh_display(); | |||||
caca_refresh_display(dp); | |||||
/* Wait for a key press event */ | /* Wait for a key press event */ | ||||
caca_get_event(dp, CACA_EVENT_KEY_PRESS, &ev, -1); | caca_get_event(dp, CACA_EVENT_KEY_PRESS, &ev, -1); | ||||
/* Clean up library */ | /* Clean up library */ | ||||