mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc_samples/; revision=11585
This commit is contained in:
parent
66ddf0b2d1
commit
5b8e4d507f
|
@ -215,6 +215,7 @@ David 23 Nov 2006
|
|||
|
||||
David 24 Nov 2006
|
||||
- change "worker" to use stdin/stdout
|
||||
- change "worker" to take nsec CPU arg
|
||||
- add example job file
|
||||
|
||||
worker/
|
||||
|
|
|
@ -30,11 +30,13 @@ int main(int argc, char** argv) {
|
|||
char buf[256];
|
||||
|
||||
fprintf(stderr, "worker starting\n");
|
||||
printf("%s\n", argv[1]);
|
||||
fgets(buf, 256, stdin);
|
||||
fputs(buf, stdout);
|
||||
int start = time(0);
|
||||
while (time(0) < start+10) {
|
||||
int nsec = 10;
|
||||
if (argc > 1) nsec = atoi(argv[1]);
|
||||
|
||||
while (time(0) < start+nsec) {
|
||||
double x=5;
|
||||
for (int i=0; i<10000000; i++) {
|
||||
x /= 2.1;
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
<application>worker</application>
|
||||
<stdin_filename>in</stdin_filename>
|
||||
<stdout_filename>out</stdout_filename>
|
||||
<command_line>-foo</command_line>
|
||||
<command_line>10</command_line>
|
||||
</task>
|
||||
</job_desc>
|
||||
|
|
Loading…
Reference in New Issue