Skip to content

getime implementation is missing for mingw version of runtime pkg #598

@alexbrainman

Description

@alexbrainman
What steps will reproduce the problem?

1. build go

2. crosscompile runtime pkg for mingw

cd src/pkg/runtime/
export GOOS=mingw
make clean
make install

3. build small test program

cd ~/test
cat test.go

package main                                                
                                                            
func main() {                                               
        print("hello world\n")                              
}                                                           

make clean all

rm -f *.[568vq] test.exe       
8g -o _go_.8 test.go 
8l -o test.exe _go_.8
nanotime: undefined: gettime   
make: *** [test.exe] Error 1   

What is the expected output?

It is supposed to create an exe.

What do you see instead?

nanotime: undefined: gettime   

What is your $GOOS?  $GOARCH?

GOARCH=386        
GOOS=linux        

Which revision are you using?  (hg identify)

c20b85c872e5+ tip

Please provide any additional information below.

I've implemented "a" version of gettime, something along the lines of:

http://www.halcode.com/archives/2008/08/26/retrieving-system-time-gettimeofday/

I have not tested it, but at least my program builds and runs. Happy to
supply it.

Also, from what I have gathered, it might not be very accurate:

http://www.lochan.org/2005/keith-cl/useful/win32time.html

but better then nothing.


Alex

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions