_CLOCKS_PER_SEC_ problem

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
cooleyandy
Posts: 41
Joined: Sat Jul 02, 2005 10:12 am

_CLOCKS_PER_SEC_ problem

Post by cooleyandy »

I've used the clock() function from <time.h> and everything seems to run around 1000 times faster. It seems there is 1,000,000 clock ticks per second. But I checked the define _CLOCKS_PER_SEC_ and it is 1,000. Am I calculating the clock ticks wrong?

A smaller problem I'm having is that fopen() seem to always return null despite the existence of the file. Anyone have any ideas?
User avatar
Agoln
Posts: 326
Joined: Wed Jun 08, 2005 3:14 am
Location: Fort Wayne, IN

Re: _CLOCKS_PER_SEC_ problem

Post by Agoln »

cooleyandy wrote:A smaller problem I'm having is that fopen() seem to always return null despite the existence of the file. Anyone have any ideas?
Have you tried using the SCE functions? Here is a link to the IO functions: http://pspdev.ofcode.com/api.php?type=2&id=85
Lego of my Ago!
cooleyandy
Posts: 41
Joined: Sat Jul 02, 2005 10:12 am

Post by cooleyandy »

Okay, just figured out about why fopen didn't work. Every filename needs a "ms0:/" to be prefixed to be read. Programming for the psp is such a learning experience. Is there any easy way to just read the files from the same directory the eboot.pbp is in?
Post Reply