The last letter was not finished and I was logged out. anyway, time(time1); .... . . time(time2); time_taken=difftime(time2, time1); will give you the time taken for executing that segment, where appropriate types are declared in the beginning. hope this is helpful in anysense. sungsim