mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=9654
This commit is contained in:
parent
1f5960658e
commit
960d40f916
|
@ -822,6 +822,14 @@ int boinc_fraction_done(double x) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
// for use by graphics code.
|
||||
// Caller should check for values outside [0..1];
|
||||
// that means undefined (no information available).
|
||||
//
|
||||
double boinc_get_fraction_done() {
|
||||
return fraction_done;
|
||||
}
|
||||
|
||||
int boinc_receive_trickle_down(char* buf, int len) {
|
||||
std::string filename;
|
||||
char path[256];
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#endif
|
||||
|
||||
// ANSI C API BEGINS HERE
|
||||
// Do not put implementation stuff here
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -66,7 +67,6 @@ struct BOINC_STATUS {
|
|||
|
||||
extern int boinc_init(void);
|
||||
extern int boinc_finish(int status);
|
||||
extern void boinc_exit (int status);
|
||||
extern int boinc_resolve_filename(const char*, char*, int len);
|
||||
extern int boinc_parse_init_data_file(void);
|
||||
extern int boinc_write_init_data_file(void);
|
||||
|
@ -92,6 +92,7 @@ extern int boinc_receive_trickle_down(char* buf, int len);
|
|||
extern int boinc_init_options(BOINC_OPTIONS*);
|
||||
extern int boinc_get_status(BOINC_STATUS*);
|
||||
#endif
|
||||
extern double boinc_get_fraction_done();
|
||||
|
||||
#ifdef __APPLE__
|
||||
extern int setMacPList(void);
|
||||
|
@ -128,6 +129,7 @@ extern int suspend_activities(void);
|
|||
extern int resume_activities(void);
|
||||
extern int restore_activities(void);
|
||||
extern int boinc_init_options_general(BOINC_OPTIONS& opt);
|
||||
extern void boinc_exit(int status);
|
||||
extern int set_worker_timer(void);
|
||||
extern void (*stop_graphics_thread_ptr)();
|
||||
|
||||
|
|
|
@ -2851,3 +2851,10 @@ Rom 14 Mar 2006
|
|||
|
||||
client/
|
||||
acct_mgr.C
|
||||
|
||||
David 15 Mar 2006
|
||||
- API: add boinc_get_fraction_done(): call this from graphics thread
|
||||
to get latest fraction done reported by worker thread.
|
||||
|
||||
api/
|
||||
boinc_api.C,h
|
||||
|
|
|
@ -187,10 +187,14 @@ To keep this display current, an application should periodically call
|
|||
The <code>fraction_done</code> argument is an estimate of the
|
||||
workunit fraction complete (0 to 1).
|
||||
This function is fast and can be called frequently.
|
||||
The sequence of arguments in successive calls should
|
||||
be non-decreasing.
|
||||
The sequence of arguments in successive calls should be non-decreasing.
|
||||
An application should never 'reset' and start over
|
||||
if an error occurs; it should exit with an error code.
|
||||
<pre>
|
||||
double boinc_get_fraction_done();
|
||||
</pre>
|
||||
returns the last value set, or -1 if none has been set
|
||||
(this would typically be called from graphics code).
|
||||
|
||||
<p>
|
||||
The following functions get information from the core client;
|
||||
|
|
|
@ -36,7 +36,7 @@ struct BOINC_OPTIONS {
|
|||
int direct_process_action;
|
||||
};
|
||||
|
||||
int boinc_init_options(BOINC_OPTIONS&);
|
||||
int boinc_init_options(BOINC_OPTIONS*);
|
||||
</pre>
|
||||
";
|
||||
list_start();
|
||||
|
@ -80,7 +80,7 @@ BOINC_OPTIONS options;
|
|||
|
||||
options.main_program = true;
|
||||
...
|
||||
boinc_init_options(options)
|
||||
boinc_init_options(&options)
|
||||
read main state file
|
||||
for each remaining worker program:
|
||||
aid.fraction_done_start = x
|
||||
|
@ -104,7 +104,7 @@ BOINC_OPTIONS options;
|
|||
|
||||
options.main_program = false;
|
||||
...
|
||||
boinc_init_options(options);
|
||||
boinc_init_options(&options);
|
||||
...
|
||||
do work, calling boinc_fraction_done() with values from 0 to 1,
|
||||
and boinc_time_to_checkpoint(), occasionally
|
||||
|
|
|
@ -108,7 +108,7 @@ language("Finnish", array(
|
|||
));
|
||||
language("French", array(
|
||||
site("http://boincfrance.org", "BOINCFRANCE.ORG"),
|
||||
site("http://www.boinc-fr.net", "www.boinc-fr.net"),
|
||||
site("http://www.boinc-af.org", "L'Alliance Francophone"),
|
||||
site("http://boinc-quebec.org", "boinc-quebec.org")
|
||||
));
|
||||
language("German", array(
|
||||
|
|
Loading…
Reference in New Issue