X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Ffoldkeys.c;h=a5e25e30bb82a77c6b7f12569eded6af2d7426fd;hp=180f15102520a0cd83580291e3cf164e30783ac7;hb=52aa842907b31bb56fb5133da3f023b45bd4355f;hpb=90e3b6f9d5d7b2f2e6220b768306ec485ae8a4bf;ds=sidebyside diff --git a/test/foldkeys.c b/test/foldkeys.c index 180f1510..a5e25e30 100644 --- a/test/foldkeys.c +++ b/test/foldkeys.c @@ -29,7 +29,7 @@ /* * Author: Thomas E. Dickey, 2006 * - * $Id: foldkeys.c,v 1.3 2006/12/09 16:54:07 tom Exp $ + * $Id: foldkeys.c,v 1.4 2010/11/14 01:00:53 tom Exp $ * * Demonstrate a method for altering key definitions at runtime. * @@ -229,8 +229,8 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) #if HAVE_GETTIMEOFDAY gettimeofday(¤t, 0); - secs = current.tv_sec - previous.tv_sec; - msecs = (current.tv_usec - previous.tv_usec) / 1000; + secs = (int) (current.tv_sec - previous.tv_sec); + msecs = (int) ((current.tv_usec - previous.tv_usec) / 1000); if (msecs < 0) { msecs += 1000; --secs;