English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 04 March 2016, 06:51   #1
xArtx
Registered User
 
Join Date: Jun 2013
Location: Australia
Posts: 685
Set System Time

Hi Guys
Does anyone have a snippet to set system time that works?
I’ve tried several examples that crash or freeze if they do compile.

Also what’s the difference between Open_A_Device and just OpenDevice?
The former complains about unprototyped call when I try to compile the
example from Abucus - Advanced System Programmer’s Guide (I know there are mistakes in it).

I already wrote working code to come up with seconds from 1st Jan 1978.
xArtx is offline  
Old 04 March 2016, 07:30   #2
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,026
I never heard of Open_A_Device. OpenDevice needs some preparation, like creating a reply port and allocating an IORequest. I guess Open_A_Device is something like open_timer in my example.

Here is a complete example:
Attached Files
File Type: c setsystime.c (3.4 KB, 107 views)
thomas is offline  
Old 04 March 2016, 10:24   #3
xArtx
Registered User
 
Join Date: Jun 2013
Location: Australia
Posts: 685
Thanks Thomas,
It looks like I wasted my time converting a time & date to epoch seconds!
Can’t wait to try it
xArtx is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sync to system time? JumpingJackson support.FS-UAE 1 04 August 2015 00:15
[Found: The Executioner] Looking for a thrust-type game set in medieval time pickaweapon Looking for a game name ? 3 07 August 2011 20:52
App to update Amiga System time from web time?? DDNI request.Apps 2 31 December 2007 07:21
Tool to set spindown time of 2 1/2 inch hds? Jerry request.Apps 19 25 May 2006 00:21
Set time and date on A500 jonmoore support.Hardware 4 09 July 2005 08:35

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 13:34.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.06898 seconds with 14 queries