Merge pull request #2721 from ludovic-henry/fix-mono_ms_ticks
[mono.git] / mono / metadata / icall.c
index 507e18becc97c3c90e66863ca7eec16026a96f1e..e22c730342dc4a3bc8eadcb4932aa9722ad5cc93 100644 (file)
@@ -3486,7 +3486,8 @@ write_enum_value (char *mem, int type, guint64 value)
                break;
        }
        case MONO_TYPE_U2:
-       case MONO_TYPE_I2: {
+       case MONO_TYPE_I2:
+       case MONO_TYPE_CHAR: {
                guint16 *p = (guint16 *)mem;
                *p = value;
                break;
@@ -7277,6 +7278,14 @@ ves_icall_System_Environment_BroadcastSettingChange (void)
 #endif
 }
 
+ICALL_EXPORT
+gint32
+ves_icall_System_Environment_get_TickCount (void)
+{
+       /* this will overflow after ~24 days */
+       return (gint32) (mono_msec_boottime () & 0xffffffff);
+}
+
 ICALL_EXPORT gint32
 ves_icall_System_Runtime_Versioning_VersioningHelper_GetRuntimeId (void)
 {